Hi Prangesco,
Thanks for your message.
Are you able to install the Email Log plugin and see if anything from BNFW is logged there?
Thanks,
Jack
Hi Jack and thanks for your prompt reply.
I alrady tried the troubleshouting procedure from your website, installed the EMail Log plugin and nothing, notifications simply aren’t triggered, although general notification work properly throughout the installation, including FEP pro native notification messages.
Moreover BNFW notifications work fine until I do not activate FEP pro so I think I can confirm there must be some conflict going on.
Ok, no probs. Thanks for going through the help doc.
Are emails from FEP Pro appearing in the email log plugin?
Jack
Yes they do are registered by Email Log.
Thanks Prangesco,
It sounds like a conflict with FEP Pro affecting BNFW in which case the devs of the plugin need to take a look.
If BNFW was interfering with FEP Pro’s functionality, I would take a look but I don’t think there’s a lot I can do if another plugin is affecting BNFW.
Hope you hear back from them soon – let me know how you get on.
Jack
Hello aain Jack
According to FEP pro devs they are able to make it work on their installation. As for my part, even with just these 2 plugins on (your and FEP) I am stucked at the starting point:
BNFW notifications works till when I activate FEP PRO.
Do you think you could be so kind to download the free version of FEP (check link on the first post of this thread) and check if you can reproduce my issue?
(no notifications for new CPT to desired roles excluding post author?)
THanks in advance for your kind support
Hi Prangesco,
Sure, happy to do that but can you first do a fresh installation of WordPress, install both plugins and see if they work? If they do then it may be an issue with your database. It’s also worth making sure you’re using a fairly recent version of PHP too, just in case your site setup differs from the devs of the FEP Pro plugin.
Let me know how you get on.
Thanks,
Jack
Thanks for getting back to me Jack
I’ve already been testing with the latest versions of both plugins and the latest WP built.
I have made a small step forward, and although it does not solve my problem it is heping identifying it a bit better.
If i install first FEP and then BNFFW I get all posts and cpts published from wp dashboard to be regularly notified through BNFW, while all those that go through FEP frontend forms just don’t, which at least restrict the search scope. If you have any useful idea anyway feel free to share 😉
And in the meanwhile thanks for your fast feedback
Hi Prangesco,
Thanks for continuing to troubleshoot.
It sounds like the FEP Pro plugin is inserting posts into the database directly. Are you happy looking through the code of the plugin?
You’re looking for something like wp_create_post or wp_insert_post.
Thanks,
Jack
Thanks to you to keep helping Jack,
as you pointed out this is actaually the case. I found one instance of wp_insert_post and none of wp_create_post .
It is located in the function responsible for inserting the post into the database. What would you advise?
Anyway the function is commented as follows:
/**
* Inserts user submitted data into DB with WordPress’ own wp_insert_post(). If insertion is successful, sets terms, saves meta and creates the thumbnail.
*
* It traverses through the form fields and by checking their types puts the corresponding data items ($post_data[$key]) into either $post, $custom_fields, $hierarchical_taxonomies or $non_hierarchical_taxonomies. The first one is inserted using wp_insert_post(). It should be noted that the key of each field is used as the name attribute in the form. This is why we are able to access the right piece of information using $post_data[$key].
*
* @access private
* @param array $post_data An array containing all the data from the form. It is actually $_POST.
* @return int or WP_Error Either the ID of the new post is returned or a WP_Error object.
**/
Let me know if there’s any other piece of info I can provide within the constraints of the plugin license or provide any email address of yours if it simpler for you to continue this conversation via email.
Thank you very much again
Hi Prangesco,
Thanks, that’s helpful.
So, the problem is that the FEP Pro plugin is inserting posts into the database directly and therefore isn’t transitioning them between post statuses like how WordPress does it if you post form the backend. When a post transitions from a status like draft to publish, BNFW can detect this change and send out a notification for it. Unless a plugin or theme does this then it’s hard to pick up the change.
There’s a BNFW filter for themes that do this but not for plugins.
I’ll investigate what I can do towards helping this but at the mo, I’m not sure there’s a massive amount more I can do.
Hope this helps a bit.
Thanks,
Jack
Closing due to inactivity. If you need further help with this, please feel free to re-open this thread.
I can see that the filter for themes that you mention above has been included in lines 110 to 116 of bnfw.php
I’m wondering if there is any reason why this can’t simply be replaced with just what is on line 115, namely:
add_action( 'wp_insert_post', array( $this, 'insert_post' ), 10, 3 );
Hi KTS915 ,
The wp_insert_post hook can’t be used because it doesn’t differentiate between a new post and post update notification, unfortunately.
Jack
I see. Thanks for the clarification. That seems like a problem that should be addressed in core.