Bug in Relevanssi Integration
-
Hi,
In the search_query_simple() function there is a call to relevanssi_do_query(), which only returns post objects. Perhaps it once returned IDs on request but certainly not now.
@return array The found posts, an array of post objects.
relevanssi_do_query()This means there’s a query error on search pages, due to not having any post IDs in the IN MySQL function.
In my copy of the plugin, I have rectified it with an elseif as follows:
foreach($posts as $post) { if( is_numeric($post) ) { $correct_posts[] = $post; } elseif( $post instanceof WP_POST ) { $correct_posts[] = $post->ID; } }
Could you implement this or a similar fix for the next version, please?
Best,
Dave
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Bug in Relevanssi Integration’ is closed to new replies.