• Resolved pixeljunction

    (@pixeljunction)


    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.

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author bnfw

    (@voltronik)

    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,
    Jack

    Thread Starter pixeljunction

    (@pixeljunction)

    Hi Jack

    Thanks for coming back to me. Unfortunately the link you’ve provided doesn’t work. Please could you add it again.

    Many thanks

    Plugin Author bnfw

    (@voltronik)

    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,
    Jack

    Thread Starter pixeljunction

    (@pixeljunction)

    Hi 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.

    Plugin Author bnfw

    (@voltronik)

    Hi @pixeljunction,
    Have you tried this help document, linking to the P2 filter in BNFW? https://betternotificationsforwp.com/documentation/compatibility/p2-theme/

    Thanks,
    Jack

    Thread Starter pixeljunction

    (@pixeljunction)

    Hi

    Yes I’ve tried that and unfortunately it doesn’t work.

    Many thanks

    Plugin Author bnfw

    (@voltronik)

    Are you using the standard post type or a custom post type with P2?

    Thanks,
    Jack

    Thread Starter pixeljunction

    (@pixeljunction)

    Just the standard post type.

    Many thanks

    Plugin Author bnfw

    (@voltronik)

    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,
    Jack

    Thread Starter pixeljunction

    (@pixeljunction)

    All 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

    Plugin Author bnfw

    (@voltronik)

    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,
    Jack

    Thread Starter pixeljunction

    (@pixeljunction)

    Hi 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

    Plugin Author bnfw

    (@voltronik)

    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.

    Plugin Author bnfw

    (@voltronik)

    Hi @matt_postlethwaite,
    Thanks for continuing to troubleshoot this.

    Are you able to add an error_log to the bnfw_insert_post_hook_for_theme function to confirm that the filter was actually called?

    Thanks,
    Jack

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘P2 Theme Notifications not sending’ is closed to new replies.