Reply To: Not displaying at all with Event Manager and BuddyBoss.

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Not displaying at all with Event Manager and BuddyBoss. Reply To: Not displaying at all with Event Manager and BuddyBoss.

#10959

Ernest Marcinko
Keymaster

Hi,

This was a tough one, but I have found the reason why it was happening. I will try to explain the best way I can.

What I noticed that the search shortcodes were executed, but returned an empty string. I was first suspecting that something might be overriding them. I was correct, but it was not a 3rd party plugin, but ajax search pro itself. There is only a few situations when ajax search pro disables it's own shortcodes – when a new post is created, updated and deleted, to avoid indexig it's own shortcode contents.

The way this is done, is that WordPress has “hooks” provided for these actions, so it's very easy for a plugin to connect events for it. When creating and updating new posts, the “save_post” and the “wp_insert_post” hooks are activated. However in your case, when opening the front page, both of these hooks are triggered for some reason (this should not happen at all), which was causing the plugin to think that a post is just being created – causing further problems. I had to de-activate the indexing hooks for ajax search pro to fix this.

However this does not fix the issue itself. Something (plugin or a theme) is causing the “save_post” and “wp_insert_post” hooks to trigger upon page view, which might cause more trouble in the future, as those are meant to be triggered by WordPress core only. Unfortunately there is no bypass solution I could implement for an upcoming update either to somehow detect this, as these hooks are meant to be used correctly, and it's not possible to check if they run exactly when they should.

I hope this helps!

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)