Support » Plugin: Search Everything » empty search / error filtering posts in admin pages

  • marsuby

    (@marsuby)


    Trying to filter posts oder pages on the admin pages (e.g. for date, category) caused wordpress to crash. The error reported was an sql error, caused by an invalid where clause, similar to the subsequent:

    … WHERE wp_term_relationships.term_taxonomy_id IN (157)
    AND ((()))
    AND wp_posts.post_status = ‘publish’) … GROUP BY …

    Deactivating ‘SearchEverything’ resolved the problem. After re-activating it, I started to debug. In my case, an invalid empty where clause causes the problem, which is generated by

    SearchEverything::se_search_default() :
    if no search terms are given, the funtion returns ‘()’ as an empty search default.

    For my needs, I’ve added a hotfix in SearchEverything::se_search_where():

    //TODO: Hotfix! with empty search params, se_search_default()='()’
    // leading to an invalid where clause … AND ((()))
    if ( $searchQuery != ” && $searchQuery != ‘()’ ) {
    $where = ” AND ((” . $searchQuery . “)) “;
    }

    Perhaps it’s the same cause for other empty search related errors.

    • This topic was modified 1 year ago by  marsuby.
    • This topic was modified 1 year ago by  marsuby.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Rogyw

    (@turtleline)

    Thanks for tracking this down @marsuby and for the suggestion.
    I had a case with bbPress content not being displayed – turned debug.log on and the same invalid SQL issue ((())) was being reported. Site used Search Everything and bbPress. Disabling Search Everything allowed the content to display. Adding your hotfix also helped.

    relish1227

    (@relish1227)

    I have experienced a similar issue with filtering using Admin Columns Pro. When Search Everything is disabled, ACP works again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘empty search / error filtering posts in admin pages’ is closed to new replies.