davinian
Forum Replies Created
-
Many thanks for the follow-up and comment on Github.
I tried the bpges-init-batch snippet but nothing happened, emails stayed stuck in the
wp_bpges_queued_items
table. bpges-debug.log didn’t show anything which I suspect is correct as the snippet doesn’t handle errors, so I enabled WP Debug and found the following in debug.log[30-Oct-2024 07:54:15 UTC] PHP Notice: Undefined variable: activity in /var/www/mysite.tld/htdocs/wp-content/themes/mytheme/functions.php on line 426
Line 426 =
'activity_id' => $activity->id,
After talking to the client they decided not to send the emails after all ?? so I flushed the
wp_bpges_queued_items
table — but I am guessing it might be good to find a fix for this as other people might find it useful?Regarding the snippet to override the number of emails batched by BPGES, I have found the GD Mail Queue plugin (when setup correctly) will intercept all emails sent from WP and BP and queue them in batches of X (50 in my case) — so far all tests with group updates are now working as expected and batches of 50 emails are sent out every 5 mins via GD Mail Queue.
If you need me to test anything or if you have any questions, please let me know, as I do have a dev site with stuck emails.
Regards,
DavidHi @carazo
No, it was the first time I’ve used the plugin on this website, so default settings. Just exported a csv of all users (approx 360), edited the export to add a new Role on approx 140 users, deleted the other users and removed unwanted columns, saved as a new csv and imported selecting update existing users. It all worked as expected, just spotted the errors in Tools > Scheduled Actions.
I’ve subsequently looked on another site that I knew I’d used the plugin in the past and found it was still active and there were over 35K failed errors in Tools > Scheduled Actions! Again no periodic imports enabled — I’ve disabled the plugin and will search for the errors in the db and clear them there.
Hi, I am also seeing the action_scheduler/migration_hook failed errors in Tools > Scheduled Actions.
I don’t have WooCommerce installed and only installed/activated Import and export users and customers to quickly export/import Users and add a new Role on some of them, in the time it took me to do this I have 40+ failed errors.
In the log, alternating failed items says the following which may help identify where it’s coming from?
- action created
- action started via WP Cron
- action failed via WP Cron: Scheduled action for action_scheduler/migration_hook will not be executed as no callbacks are registered.
- action created
- action started via Async Request
- action failed via Async Request: Scheduled action for action_scheduler/migration_hook will not be executed as no callbacks are registered.
It’s highly likely something else is going on in the background, and ActionScheduler is just catching and recording the errors?
Following up on this, I have identified the problem, and have a couple of question which I am hoping you can answer ??
SoI updated a group with 226 members this afternoon, bpges-debug.log containsBeginning batch of immediate notifications for 572
and no errors, but checking my email logs (I use Brevo) I notice only 96 emails were actually sent. Looking inwp_bpges_queued_items
I can see the other 130 are stuck.Digging in the server logs there is nothing obvious until I checked the php error log and found
script '/var/www/mywebsite.tld/htdocs/wp-admin/admin-ajax.php' (request: "POST /wp-admin/admin-ajax.php?action=wp_bpges_send_queue&nonce=582010d750") execution timed out (68.861109 sec), terminating
— so my php is timing out for the process.I know I could increase the php timeout, but searching online I think it would be better to use something to batch/queue emails — one suggestion is GD Mail Queue plugin, but I wonder if there is a way to force BPGES to send in batches or if you have any other suggestions?
One last thing, is there a way to trigger and send the stuck emails in
wp_bpges_queued_items
from the last group update earlier today?Kind regards,
David- This reply was modified 3 weeks, 4 days ago by davinian.
Thanks @boonebgorges
Found your troubleshooting notes earlier and have enabled logging so will see what happens.
I suspect the underlying issue may have been another ‘older’ BuddyPress plugin that doesn’t like PHP 8.1 — will do some more testing and see if I can work out what happened — but at the moment everything is working on PHP 7.4.
Regarding
wp_bpges_queued_items
thanks for clarification, I will clear the old items and monitor.
Kind regards,
David- This reply was modified 4 weeks ago by davinian.
Hi @boonebgorges, I have recently noticed something strange and think the problem is also related to the June update.
About 3 weeks ago we noticed not all Group Update emails were being sent to everyone in the group. After some digging I had to roll my php version back to 7.4 (was on 8.1) and now it appears new Group Updates are being sent to everyone correctly.
However, trying to track back to work out when the problem started I notice there are 1000+immediate
items in thewp_bpges_queued_items
table with the oldest dating back to2024-06-14 17:38:21
the newest date is prior to the php rollback.Looking in View queued digest items (/?sum=1) I don’t see anything.
Is the items in
wp_bpges_queued_items
stuck emails? If yes, I am guessing it would be logical to empty this table rather than sending what would likely be very confusing emails?Any advise or suggestion greatly received — also happy to do any checking/testing.
Regards,
DavidSorry, I do not like it when plugins merge like this and instantly display adverts — I’ve removed your plugin and found something else.
Also, I do not need another Blocks plugin, I am happy using the default blocks, I just needed a simple map block!
- This reply was modified 1 month ago by davinian.
Update: It appears the problem was related to an update to Spectra plugin which modified dates on posts and events — they have released an update which is meant to fix the problems but I have stopped using it so cannot verify.
@reneedobbs @karlemilnikka I had a similar problem when I ran the updater – it changed dates on Events (custom post type) which resulted in some events being unpublished and others saved as draft.
Luckily I had a recent backup so was able to restore my site and have now found an alternative to Spectra.
Forum: Plugins
In reply to: [Spectra - WordPress Gutenberg Blocks] Broke my site again!Sorry, I have disabled and removed the plugin from all my sites so cannot comment if the update fixes the issues.
@mohsinbsf thanks for your reply – but I am sorry, I have decided to remove Spectra from all my sites as I cannot afford to use a plugin that breaks my websites every other update.
I can also confirm the refresh behaviour in the WP Admin!
Thanks, I have read the documentation, but it’s not clear how Categories work – they are controlled by the main site and it appears you can only add new categories there, but surly something fundamental like Categories should work on both main and sub sites?
Example, It’s possible to view events created on a sub-site in a category archive (on the sub-site), but when you click on an event you are directed to the main site? The Tags work as expected so I am wondering if this is a bug?
Hoping someone will be able to explain?
I’ll add a bit more context – the problem I am having is I want users to stay on the sub-site when viewing Categories / Events – at the moment the user is redirected back to the main-site..
main-site.tld/events/categories/music
sub-site.tld/events/categories/musicIs this possible?