bp_activity_after_save & page refresh
First of all, I am new to this world.
I have a simple webpage with a forum. WP 4.9.4. buddypress 2.9.3. bbpress and other plugins, among which BuddyPress Group Email Subscription.
about 200 users (but little activity, less than 300 topics, about 1000 posts).
When someone posts a new topic/reply it takes minutes from pressing “submit” to seeing the page refreshed with the message posted.
by debugging it a bit, I discovered that it gets stuck in a for loop in the BuddyPress Group Email Subscription. I wonder if this is normal, but I saw that several people had this issue with that plugin, and I also saw that the developers are not very responsive.
Anyway, this is my point: the BuddyPress Group Email Subscription function is included in this way:
add_action( ‘bp_activity_after_save’ , ‘ass_group_notification_activity’ , 50 );
So, I suppose that the post is firstly saved, then the function is called.
However, users do not know this, they just see that the page takes minutes to refresh. And thus they are tempted to stop the loading and resubmit the post (generating in fact duplicates).
My question is: is it possible to refresh the page after the post is saved, and only later call the BuddyPress Group Email Subscription function? Like if the would be a bp_activity_after_post or bp_activity_after_refresh option?
Or other suggestions on how to solve the issue? Are there other ways to choose whether to receive emails after each post/reply or daily/weekly digests?
- You must be logged in to reply to this topic.