Support » Plugin: Relevanssi - A Better Search » Relevanssi and Polylang. Conflict?

  • Resolved mpgwordpress


    I have installed Relevanssi Polylang. In the settings table Relevanssi successfully found over 6000 products and pages. When I do a search with the wordpress form I don’t find any results. If I deactivate Polylang the search works. Do you have any ideas on how to fix? The problem occurs with both the Twenty Twenti Theme and the DIVI.

    I found this error in the Nginx server log:

    FastCGI sent in stderr: “PHP Warning: Creating default object from empty value in /home/myvideoimage/public_html/wp-content/plugins/relevanssi/lib/search.php on line 1380
    PHP Warning: Creating default object from empty value in /home/myvideoimage/public_html/wp-content/plugins/relevanssi/lib/search.php on line 900” while reading response header from upstream, client:, server:, request: “GET /?s=roma HTTP/1.1”, upstream: “fastcgi://unix:/var/php-nginx/15972212415753.sock/socket:”, host: “”, referrer: “”

    • This topic was modified 1 month, 1 week ago by mpgwordpress.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Mikko Saari


    The warnings you’re seeing mean there’s a null value for the $query. That’s something that shouldn’t happen so yes, something’s going wrong somewhere. I’m not sure what could cause that, though.

    Does toggling the Polylang option in the Relevanssi searching setting affect this at all?

    Hi Mkko

    The option “Polylang. Allow results from all languages.” is enabled but does not affect behavior. I really don’t know what to do. The problem occurs even if I turn off Relevanssi.

    If I deactivate Polylang it works perfectly.

    Do you have any idea?
    Thank you

    Plugin Author Mikko Saari


    If the problem happens even with Relevanssi disabled, asking on the Polylang support forums might be helpful.

    What does the Relevanssi MySQL search query look like? Here’s how you can find that out:

    This is the result when looking for the word “rome”.
    Now even if I deactivate Polylang I don’t get any results.


    Query Vars
    View Main Query

    posts_per_page 5
    cache_results 1
    comments_per_page 50
    lazy_load_term_meta 1
    operator OR
    order DESC
    post_type any
    s rome
    [0] => X7ZOyR8qZ_posts.post_title LIKE ‘{9b5ea05c115c8c80676db3a24fc3c22159ea2a43475bf1c977c7224e6215d895}rome{9b5ea05c115c8c80676db3a24fc3c22159ea2a43475bf1c977c7224e6215d895}’
    [0] => rome
    search_terms_count 1
    term_id 2065
    update_post_meta_cache 1
    update_post_term_cache 1
    Queried Object

    Current User
    Current User: #2

    Request Data
    Remote IP -My IP
    HTTP method GET
    Requested URL

    Plugin Author Mikko Saari


    What about the MySQL query? Does Relevanssi admin search (Dashboard > Admin search) find results?

    I have now enabled “Use Relevanssi for admin searches.” but I don’t get any results.

    Plugin Author Mikko Saari


    I mean the Relevanssi admin search under Dashboard > Admin search. Does that get you zero results as well?

    Search as administrator in the Dashboard works fine, I see all the results.

    Plugin Author Mikko Saari


    What does the Relevanssi MySQL query look like if you look at it with Query Monitor?

    Hi Mikko

    Sorry but I’m not familiar with Query Monitor.
    Is this the report you ask me?
    Above I see: 0.71s; 54,460 KB; 0.1117 S; 114 Q.

    In the panel I read:

    SELECT COUNT(DISTINCT(relevanssi.doc))
    FROM X7ZOyR8qZ_relevanssi AS relevanssi
    WHERE relevanssi.term = ‘rome’ +
    Plugin: relevanssi 1 0.0314
    70 SELECT DISTINCT(relevanssi.doc), relevanssi.*, relevanssi.title * 5 + relevanssi.content * 1 + relevanssi.comment * 0.75 + relevanssi.tag * 1 + * 0 + + relevanssi.category * 1 + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf
    FROM X7ZOyR8qZ_relevanssi AS relevanssi
    WHERE relevanssi.term = ‘rome’
    LIMIT 500 –

    If you need other data, ask for them. Thank you very much.

    Plugin Author Mikko Saari


    That’s it. The query looks fine, there’s no reason why it shouldn’t return results.

    Is the search results template created with Divi? That does not work with Relevanssi (yet; I think they’re adding Relevanssi compatibility there in a future version).

    Hi Mikko,

    Yes, the search form is that of DIVI.
    Is there a way to use Detect by entering a code to call up the search form bypassing the DIVI one?

    Thank you

    Plugin Author Mikko Saari


    Search form is not the problem. The Divi search form is fine. I’m talking about the results. Are you using the Divi Search Results element? That doesn’t work with Relevanssi. Relevanssi works with the WordPress default search results template. Which one are you using?

    Hi Mikko

    I built a page with the DIVI search results template. How can I use the wordpress one? Can I enter a code?
    Thank you

    I confirm. the problem was in the custom results page created with DIVI.

Viewing 15 replies - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.