Problem with the background notification
-
Hi ! I’m using the plugin and it works well, but I have an issue. It’s sending to much email in too short time so some emails are not sent when there’s a lot to send. I use FluentSMTP with amazon AWS subscription to send my emails and everything worked smoothly until now. When I use the option Background Notifications, the emails are just not sent at all. Can you help me with that ?
-
Also, sometimes the email sent is blank, I don’t know why
Hi @kreartmedia,
Thanks for reaching out. The purpose of background notifications is to avoid timeouts when someone posts a topic or reply, as bbpnns will try to send notifications of that item to everyone that it has been configured to send.
When the next user visits the site, the WordPress cron job triggers the notifications without impacting the user’s visit. That said, the WP cron system is known to be iffy, so many site admins choose to disable the wp cron and enable a real cron job instead.
The best way to enable that depends on each host, so I can’t really give you detailed information here. My own favourite way to do it is by using
/path/to/wp-cli --path=/path/to/www/install cron event run --due-now
, run every 5 minutes or so. Some hosts (like SiteGround) ask that you refrain from running cron jobs more frequently than once every 30 minutes, but that just isn’t realistic with WordPress.Cheers,
Vinny-
This reply was modified 1 year, 9 months ago by
useStrict. Reason: Missed a parameter to wp-cli
Hi ! I changed my cron configuration, but I have another issue, sometimes the email sent is blank.
Here are my infos :
array(12) {
["PHP Version"]=>
string(6) "7.4.33"
["WordPress Version"]=>
string(5) "6.2.2"
["BBPNNS Settings"]=>
array(24) {
["newtopic_email_subject"]=>
string(45) "[topic-forum] | Nouveau sujet : [topic-title]"
["newreply_email_subject"]=>
string(70) "[reply-forum] | Une réponse a été ajoutée au sujet : [topic-title]"
["newtopic_email_body"]=>
string(1217) "
[topic-forum] | Nouveau sujet : [topic-title] Bonjour [recipient-first_name] [recipient-last_name], Un nouveau sujet a été publié dans le forum [topic-forum] par [author-first_name] [author-last_name] de [cour_forum_courriel usrname="[author-display_name]"] :
[topic-title] ? [topic-excerpt] ? Connectez-vous pour voir le sujet complet Si le premier lien ne fonctionne pas, essayez celui-ci : Cliquer ici si vous êtes déjà connectés Vous recevez ce message car vous vous êtes abonné(e) au forum ? [topic-forum] ?. Si vous ne voulez plus recevoir ces messages, retournez sur le forum pour vous en désabonner.
"
["newreply_email_body"]=>
string(1323) "
[reply-forum] | Une réponse a été ajouté au sujet : [topic-title] Bonjour [recipient-first_name] [recipient-last_name], Une nouvelle réponse a été publiée dans le sujet :
[topic-title] de [topic-author] de [cour_forum_courriel usrname="[topic-author]"] [author-first_name] [author-last_name] de [cour_forum_courriel usrname="[author-display_name]"] a répondu : ? [reply-excerpt] ? Connectez vous pour voir la réponse complète Si le premier lien ne fonctionne pas, essayez celui-ci : Cliquer ici si vous êtes déjà connecté Vous recevez ce message car vous vous êtes abonné(e) au sujet ? [topic-title] ?. Si vous ne voulez plus recevoir ces messages, retournez sur le sujet pour vous en désabonner.
"
["newtopic_recipients"]=>
array(0) {
}
["newreply_recipients"]=>
array(0) {
}
["encode_subject"]=>
bool(false)
["newtopic_background"]=>
bool(false)
["newreply_background"]=>
bool(false)
["background_notifications"]=>
bool(true)
["default_topic_notification_checkbox"]=>
bool(false)
["default_reply_notification_checkbox"]=>
bool(false)
["override_bbp_forum_subscriptions"]=>
bool(true)
["override_bbp_topic_subscriptions"]=>
bool(true)
["include_bbp_forum_subscriptions_in_replies"]=>
bool(false)
["forums_auto_subscribe_to_topics"]=>
bool(false)
["forums_auto_subscribe_new_users"]=>
bool(true)
["notify_authors_topic"]=>
bool(true)
["notify_authors_reply"]=>
bool(true)
["hidden_forum_topic_override"]=>
bool(false)
["hidden_forum_reply_override"]=>
bool(false)
["email_type"]=>
string(9) "multipart"
["from_name"]=>
string(5) "AGCMQ"
["from_email"]=>
string(16) "[email protected]"
}
["Active Plugins"]=>
array(56) {
["redux-framework/redux-framework.php"]=>
string(6) "4.3.19"
["advanced-access-manager/aam.php"]=>
string(5) "6.9.0"
["all-in-one-wp-migration-unlimited-extension/all-in-one-wp-migration-unlimited-extension.php"]=>
string(4) "2.47"
["all-in-one-wp-migration/all-in-one-wp-migration.php"]=>
string(4) "7.69"
["bbpress-notify-nospam/bbpress-notify-nospam.php"]=>
string(7) "2.17.10"
["bbpress/bbpress.php"]=>
string(5) "2.6.9"
["better-plugin-compatibility-control/better-plugin-compatibility-control.php"]=>
string(5) "6.0.0"
["bnfw/bnfw.php"]=>
string(5) "1.9.1"
["branda-white-labeling/ultimate-branding.php"]=>
string(7) "3.4.9.3"
["breadcrumb-navxt/breadcrumb-navxt.php"]=>
string(5) "7.1.0"
["breeze/breeze.php"]=>
string(6) "2.0.24"
["cart-limits-for-woocommerce/cart-limits-for-woocommerce.php"]=>
string(5) "1.0.4"
["coming-soon/coming-soon.php"]=>
string(6) "6.15.7"
["conditional-payment-methods-for-woocommerce/conditional-payment-methods-for-woocommerce.php"]=>
string(5) "2.0.0"
["cookie-law-info/cookie-law-info.php"]=>
string(5) "3.0.3"
["disable-wp-notification/disable-wp-notification.php"]=>
string(3) "3.0"
["duplicate-page/duplicatepage.php"]=>
string(5) "4.4.9"
["emember-email-broadcast/emember-email-broadcast.php"]=>
string(4) "v2.4"
["emember-profile-extended/emember-profilex.php"]=>
string(4) "v3.4"
["envato-market/envato-market.php"]=>
string(5) "2.0.7"
["events-calendar-pro/events-calendar-pro.php"]=>
string(7) "6.0.2.1"
["fluent-smtp/fluent-smtp.php"]=>
string(5) "2.2.4"
["fr-multi-bank-transfer-payment-gateways-for-woocommerce/fr-multi-bank-transfer-gateways-for-woocommerce.php"]=>
string(5) "1.1.0"
["gd-bbpress-attachments/gd-bbpress-attachments.php"]=>
string(3) "4.5"
["if-menu/if-menu.php"]=>
string(6) "0.17.0"
["image-upload-for-bbpress/bbp-image-upload.php"]=>
string(6) "1.1.18"
["js_composer/js_composer.php"]=>
string(5) "6.9.0"
["keydesign-addon/keydesign-addon.php"]=>
string(3) "5.2"
["malcare-security/malcare.php"]=>
string(4) "5.09"
["order-import-export-for-woocommerce/order-import-export-for-woocommerce.php"]=>
string(5) "2.3.4"
["pdf-generator-addon-for-wordpress-visual-composer/pdf-generator-addon-for-wordpress-visual-composer.php"]=>
string(5) "2.1.0"
["product-availability-slots-for-woocommerce/product-availability-slots-for-woocommerce.php"]=>
string(3) "4.9"
["real-media-library-lite/index.php"]=>
string(6) "4.20.4"
["really-simple-ssl/rlrsssl-really-simple-ssl.php"]=>
string(5) "6.2.5"
["relevanssi/relevanssi.php"]=>
string(6) "4.17.1"
["revslider/revslider.php"]=>
string(6) "6.5.31"
["role-based-pricing-for-woocommerce/addify-role-based-pricing.php"]=>
string(5) "1.7.0"
["sortable-post-grid/sortable_post_grid.php"]=>
string(5) "3.4.1"
["string-locator/string-locator.php"]=>
string(5) "2.6.0"
["the-events-calendar/the-events-calendar.php"]=>
string(7) "6.0.3.1"
["unlimited-addons-for-wpbakery-page-builder/unlimited_addons.php"]=>
string(6) "1.0.42"
["wck-custom-fields-and-custom-post-types-creator/wck.php"]=>
string(5) "2.3.5"
["woo-order-export-lite/woo-order-export-lite.php"]=>
string(5) "3.4.0"
["woocommerce-and-wp-emember-integration/emember-woocommerce-addon.php"]=>
string(3) "2.2"
["woocommerce-paypal-payments/woocommerce-paypal-payments.php"]=>
string(5) "1.9.4"
["woocommerce-pdf-invoices/bootstrap.php"]=>
string(5) "3.1.9"
["woocommerce-product-addons/woocommerce-product-addons.php"]=>
string(5) "5.0.0"
["woocommerce-product-bundles/woocommerce-product-bundles.php"]=>
string(6) "6.16.0"
["woocommerce/woocommerce.php"]=>
string(5) "7.0.0"
["wp-eMember/wp_eMember.php"]=>
string(7) "v10.4.6"
["wp-html-mail/wp-html-mail.php"]=>
string(5) "3.2.3"
["wp-mail-logging/wp-mail-logging.php"]=>
string(6) "1.11.0"
["wp-menu-cart/wp-menu-cart.php"]=>
string(6) "2.14.0"
["wp-smushit/wp-smush.php"]=>
string(6) "3.12.3"
["wpforms/wpforms.php"]=>
string(7) "1.7.7.2"
["yaymail/yaymail.php"]=>
string(5) "3.0.8"
}
["Network Active Plugins"]=>
bool(false)
["Active Theme"]=>
array(3) {
["Theme Name"]=>
string(10) "Sway Child"
["Theme Version"]=>
string(3) "1.0"
["Theme URI"]=>
NULL
}
["mb_encode_mimeheader Available"]=>
string(3) "Yes"
["iconv_get_encoding Available"]=>
string(3) "Yes"
["Iconv Internal Encoding"]=>
string(5) "UTF-8"
["Site Charset"]=>
string(5) "UTF-8"
["DB Charset"]=>
string(4) "utf8"
["DB_COLLATE"]=>
string(0) ""
}Please test if there isn’t a conflict with another plugin or theme. To do that, you’ll need to create a staging site with a cloned copy of production, remove or change the email address of your forum/topic subscribers so that you don’t spam them.
Then deactivate every plugin except for bbPress and bbpnns, switch to a WP default theme (the twenty-whatevers) and try to replicate the issue. Start activating the other plugins while testing until you can replicate it. Lastly, switch back to the original theme to see if that’s what’s conflicting.
Let me know how it goes.
I found the issue, it was because of a custom tag I was trying to put in place. I need to put more info from the author of the topic or the author of the reply, but this info is from another plugin. Can you help me figure out where (in which file) the tags are formed so I can understand how it works and where I should add my code ?
I need to retreive the usrname from the author in order to get the information from my other plugin. Here is the shortcode I had previously worked on :
function wpc_shortcode_cour_forum_courriel($atts)
{
$defaults = array(
‘usrname’ => ”,
);$atts = shortcode_atts( $defaults, $atts );
$member_nom = $atts[‘usrname’];
$member = emember_get_member_by_username ($member_nom);
$id_du_membre = $member->member_id;
$id_cour = wp_emember_get_user_details_by_id(‘Cour_municipale’, $id_du_membre);
$title_cour = get_the_title($id_cour);
$shortcode=$title_cour;
return $shortcode;
}Hi,
You can hook into the following to manage any custom tags:
$email_subject = apply_filters( 'bbpnns_filter_email_subject_in_build', $email_subject, $type, $post_id ); $email_body = apply_filters( 'bbpnns_filter_email_body_in_build', $email_body, $type, $post_id );
-
This reply was modified 1 year, 9 months ago by
- The topic ‘Problem with the background notification’ is closed to new replies.