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

  • Resolved mpgwordpress

    (@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: 2.238.196.178, server: myvideoimage.com, request: “GET /?s=roma HTTP/1.1”, upstream: “fastcgi://unix:/var/php-nginx/15972212415753.sock/socket:”, host: “www.myvideoimage.com”, referrer: “https://myvideoimage.com/?s=roma&et_pb_searchform_submit=et_search_proccess&et_pb_include_posts=yes&et_pb_include_pages=yes”

    • 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

    (@msaari)

    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

    (@msaari)

    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: https://www.relevanssi.com/knowledge-base/debugging-with-query-monitor/

    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
    search_orderby_title
    Array
    (
    [0] => X7ZOyR8qZ_posts.post_title LIKE ‘{9b5ea05c115c8c80676db3a24fc3c22159ea2a43475bf1c977c7224e6215d895}rome{9b5ea05c115c8c80676db3a24fc3c22159ea2a43475bf1c977c7224e6215d895}’
    )
    search_terms
    Array
    (
    [0] => rome
    )
    search_terms_count 1
    term_id 2065
    update_post_meta_cache 1
    update_post_term_cache 1
    Response
    Queried Object
    none

    Current User
    Current User: #2

    Request Data
    Remote IP -My IP
    HTTP method GET
    Requested URL https://myvideoimage.com/?s=rome

    Plugin Author Mikko Saari

    (@msaari)

    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

    (@msaari)

    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

    (@msaari)

    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’ +
    relevanssi_search()
    Plugin: relevanssi 1 0.0314
    70 SELECT DISTINCT(relevanssi.doc), relevanssi.*, relevanssi.title * 5 + relevanssi.content * 1 + relevanssi.comment * 0.75 + relevanssi.tag * 1 + relevanssi.link * 0 + relevanssi.author + relevanssi.category * 1 + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf
    FROM X7ZOyR8qZ_relevanssi AS relevanssi
    WHERE relevanssi.term = ‘rome’
    ORDER BY tf DESC
    LIMIT 500 –
    relevanssi_search()
    wp-content/plugins/relevanssi/lib/search.php:348
    relevanssi_do_query()
    wp-content/plugins/relevanssi/lib/search.php:869
    relevanssi_query()
    wp-content/plugins/relevanssi/lib/search.php:90
    apply_filters_ref_array(‘the_posts’)
    wp-includes/plugin.php:249
    WP_Query->get_posts()
    wp-includes/class-wp-query.php:3190
    WP_Query->query()
    wp-includes/class-wp-query.php:3448
    WP->query_posts()
    wp-includes/class-wp.php:624
    WP->main()
    wp-includes/class-wp.php:747
    wp()
    wp-includes/functions.php:1285
    —–

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

    Plugin Author Mikko Saari

    (@msaari)

    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

    (@msaari)

    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.
    Grazie.

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