• Resolved peer1979

    (@peer1979)


    Search doesn’t work anymore after update for wordpress 4.5.1 and WPML. Is it possible to fix?

    Cause of problem
    Update WordPress 4.4.2 to WordPress 4.5.1 and updating all plugins.

    Reproducing problem

    I’ve tried the following steps to find the cause of this error.

    * disabled custom theme and enable default theme
    * disabled all plugins
    * search is working!
    * enabled all plugins (except the ones from https://wpml.org/)
    * enable wpml plugins -> no search results

    So there is something wrong with queries. I’ve enabled logging and it gave me this huge unreadable query when searching for TEST:

    SELECT DISTINCT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts LEFT JOIN wp_icl_translations t
    ON wp_posts.ID = t.element_id
    AND t.element_type = CONCAT(‘post_’, wp_posts.post_type) LEFT JOIN wp_postmeta AS m ON (wp_posts.ID = m.post_id) WHERE 1=1 AND ( ( wp_posts.ID = 5 AND (((((wp_posts.post_title LIKE ‘%TEST%’) OR (wp_posts.post_content LIKE ‘%TEST%’))) OR ((m.meta_value LIKE ‘%TEST%’)) )) AND wp_posts.post_type IN (‘post’, ‘page’, ‘attachment’, ‘news’, ‘product’) AND (wp_posts.post_status = ‘publish’ OR wp_posts.post_author = 1 AND wp_posts.post_status = ‘private’) AND ( ( t.language_code = ‘nl’ AND wp_posts.post_type IN (‘post’,’page’,’attachment’,’acf’,’news’,’product’,’product_variation’ ) ) OR wp_posts.post_type NOT IN (‘post’,’page’,’attachment’,’acf’,’news’,’product’,’product_variation’ ) )) AND post_type != ‘revision’) AND post_status != ‘future’ ORDER BY wp_posts.post_title LIKE ‘%TEST%’ DESC, wp_posts.post_date DESC LIMIT 0, 1

    Please help or point me in the right direction if possible, thanks!

    https://wordpress.org/plugins/search-everything/

Viewing 1 replies (of 1 total)
  • Thread Starter peer1979

    (@peer1979)

    Turns out is WPML, disable ‘WPML > Langauges > Browser language redirection’ and it works again. Hope they fix this soon.

Viewing 1 replies (of 1 total)
  • The topic ‘Search doesn't work anymore after WordPress update’ is closed to new replies.