Plugin causes issues with algolia search integration
-
Hi,
I really like this plugin and have been using it on my site for a while. However recently I stumbled across an issue when I tried to implement algolia search integration on the site (using official php library provided by Algolia) – for some reason it conflicts with the plugin.
Specifically – algolia search integration requires initialization on save_post hook, so it can index post when created or updated. It looks like this:
add_action('save_post', function ($id, WP_Post $post, $update) { global $algolia; $index = $algolia->initIndex($indexName);
The initIndex method for some reason triggers following error, when YARPP is enabled
"Trying to get property 'post_type' of non-object" stack: 0: "YARPP_Cache->sql()" 1: "YARPP_Cache_Tables->update()" 2: "YARPP_Cache->enforce()" 3: "YARPP->display_related()" 4: "YARPP_Admin->ajax_display()" 5: "do_action('wp_ajax_yarpp_display')"
I have no idea why this happens or how to get around it. I would appreciate any help.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Plugin causes issues with algolia search integration’ is closed to new replies.