P2 Theme Notifications not sending
-
I’m using the P2 Theme and BNFW and have followed the documentation but my email notifications aren’t sending. They work fine if posted in the backend of the site but not if they’re posted directly on the frontend.
-
Hi @pixeljunction,
Thanks for your message.It sounds like a potential plugin conflict to me. Please can you make your way through this document and let me know how you get on?
Thanks,
JackHi Jack
Thanks for coming back to me. Unfortunately the link you’ve provided doesn’t work. Please could you add it again.
Many thanks
Hi @pixeljunction,
Just tested and it works fine for me.If it still doesn’t work for you, please go to betternotificationsforwp.com and then go to Support > How Can I Receive the Best Support? from the menu.
Thanks,
JackHi Jack
Thanks, the link is working now. I’ve worked through the steps and have got to point 9, install the ’email log’ plugin. I’ve done this and comments are working fine (showing in the log and email notifications being received). However, new posts are only working (showing in the log and email notifications being received) if they have been added in the backend of the site. If I add a new post to the frontend of the site then nothing appears in the email log. I’m using the ‘new post published’ notification.
Many thanks for your help.
Hi @pixeljunction,
Have you tried this help document, linking to the P2 filter in BNFW? https://betternotificationsforwp.com/documentation/compatibility/p2-theme/Thanks,
JackHi
Yes I’ve tried that and unfortunately it doesn’t work.
Many thanks
Are you using the standard post type or a custom post type with P2?
Thanks,
JackJust the standard post type.
Many thanks
Hi @pixeljunction,
It should be fine.The only thing I can think of is that another plugin or bit of custom code in a child theme or functions.php file is also hooking onto the publish part of the front-end form and it’s causing a conflict.
Do you think this might be the case?
Thanks,
JackAll plugins are deactivated.
I have it installed on 2 different sites using different P2 child themes and it doesn’t work on either. I can show you the functions.php file if you like?
Thanks
Hi @pixeljunction,
It sounds like the P2 child theme might be causing the problem then. What happens if you use the standard P2 theme with the front-end filter linked to above? Does it work?Thanks,
JackHi Jack
It works on the standard P2 theme so it must be the child theme as you suggest. Any ideas what could be causing the conflict in the functions.php of the child theme?
Thanks
Hi @pixeljunction,
Well, that’s something, which is good.Not sure without seeing the code for your child theme – anything in there that hooks onto the front-end forms that could be overriding BNFW or stopping it from running?
Anything that changes their post statuses on publish?Jack
Hi @voltronik
I am a developer at Pixel Junction and have looked further into this.
I have created a new p2 child theme which only contains style.css and function.php
Style.css
/* Theme Name: mytheme Template: p2 */ @import url("../p2/style.css");Function.php
function bnfw_insert_post_hook_for_theme( $themes ) { $themes[] = 'mytheme'; return $themes; } add_filter( 'bnfw_insert_post_themes', 'bnfw_insert_post_hook_for_theme');Notification still doesn’t work with this, so I added an error_log of the $insert_post_themes array within the core bnfw.php like this:
$insert_post_themes = apply_filters( 'bnfw_insert_post_themes', array( 'P2', 'Syncope' ) ); error_log( print_r($insert_post_themes, true) );and this is what’s added to the log
[09-Nov-2016 09:39:13 UTC] Array ( [0] => P2 [1] => Syncope )Which shows that ‘mytheme’ isn’t being added as an array item.
-
This reply was modified 9 years, 4 months ago by
Matt_Postlethwaite.
-
This reply was modified 9 years, 4 months ago by
Matt_Postlethwaite.
-
This reply was modified 9 years, 4 months ago by
Matt_Postlethwaite. Reason: Fixing code blocks
Hi @matt_postlethwaite,
Thanks for continuing to troubleshoot this.Are you able to add an
error_logto thebnfw_insert_post_hook_for_themefunction to confirm that the filter was actually called?Thanks,
Jack -
This reply was modified 9 years, 4 months ago by
The topic ‘P2 Theme Notifications not sending’ is closed to new replies.