• Resolved elivnjak

    (@elivnjak)


    Hi,

    I found a bug in the latest version of the plugin.

    search-everything.php – line 278

    if ( $searchQuery != '') {
                // lets use _OUR_ query instead of WP's, as we have posts already included in our query as well(assuming it's not empty which we check for)
    			$where = " AND ((" . $searchQuery . ")) ";
    		}

    On my installation $searchQuery return ‘()’ so technically it’s not an empty string. This causes the search query to break.

    For the fix i simply put:

    if ( $searchQuery != '' && $searchQuery != '()' ) {
                // lets use _OUR_ query instead of WP's, as we have posts already included in our query as well(assuming it's not empty which we check for)
    			$where = " AND ((" . $searchQuery . ")) ";
    		}
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Sovrn

    (@sovrn)

    Hello @elivnjak,

    Thank you for your inquiry and we apologize for any inconvenience this may be causing. We are actively investigating the issue and working on a solution. If you have any questions in the meantime, please feel free to reach out to us at [email protected].

    Thank you for your patience in resolving this issue.

    Regards,

    Sovrn Support

    Hi there,

    Just want to second the bug and the fix of it. I derived exactly the same version and now things work as they should. In my case it broke custom taxonomy filter on the admin listing screens.

    Thanks!

    Plugin Author Sovrn

    (@sovrn)

    @elivnjak

    you are the real mvp, this solution fixed the apache issues i had with the newest version!

    Yes! Fixed issue on my sites as well.

    @sovrn – Can this fix be added to the plugin so the next update does not break the fix?

    @sovrn – Can you please respond with an update on when this will be added?

    @elivnjak’s solution is ok. But I would recommend to dig a little bit deeper and see why there is an empty parenthesis. Then we see that the method se_search_default is causing the issue by opening and closing a parenthesis also if the $terms array is empty (Lines 304-319). So why not return just an empty string in that case from line 302:

    if (empty($terms)) return '';

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Search Query Bug fix’ is closed to new replies.