• When I do a product search, I no longer have results.
    I disabled all plugins and then it worked. Then I enabled Relevanssi and it stopped working. Can you please check what is going on?

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

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

    (@msaari)

    What has changed? Do you have a complete index for Relevanssi? If you look at the Searching tab of Relevanssi settings, are all weight settings non-zero? What other plugins are you using?

    Thread Starter darkallman

    (@darkallman)

    What changed was Woocommerce was updated.

    Do you have a complete index for Relevanssi?

    Yes:
    1533 documents in the index.
    46125 terms in the index.

    If you look at the Searching tab of Relevanssi settings, are all weight settings non-zero?

    Yes!

    What other plugins are you using?

    I use quite an extensive list of plugins.
    I disabled all plugins except woocommerce, Avada core plugins (theme) and Relevanssi. With Relevanssi no product results, without, I have results.

    Plugin Author Mikko Saari

    (@msaari)

    Does Relevanssi admin search (Dashboard > Admin search) work? Have you tried one of the default themes (you don’t need to switch themes, you can test with the live preview)?

    Thread Starter darkallman

    (@darkallman)

    Admin search on products works fine. I get results.
    search in Live Preview of twenty twenty gives results.

    @missflibble Do you also use Avada as your theme?
    Maybe we have a conflict with Avada then.

    Plugin Author Mikko Saari

    (@msaari)

    It would not be the first time Avada is causing trouble.

    Could you please install Query Monitor and tell me what kind of queries Relevanssi generates with Avada? If you set the “Caller” to “relevanssi_search()”, you should have something that begins “SELECT DISTINCT”, what’s that?

    Thread Starter darkallman

    (@darkallman)

    btw, as soon as I remove &post_type=product I do have results

    Plugin Author Mikko Saari

    (@msaari)

    What if you replace it with &post_types=product, do you get product-only results?

    Thread Starter darkallman

    (@darkallman)

    Like this?
    post_type=product
    https://test.lievelabels.nl/?s=badjas&post_type=product
    No results

    post_types=product
    https://test.lievelabels.nl/?s=badjas&post_types=product
    results, but looks like normal search, not relevanssi

    Plugin Author Mikko Saari

    (@msaari)

    Actually, the one with post_types is Relevanssi, just using the default search template (if post_types works, that means you’re seeing Relevanssi results, it’s
    a Relevanssi parameter); using post_type=product gets you the theme-specific product template.

    But anyway, check the SQL query from Query Monitor for the failing search, that should give us a better idea why this is not working.

    Thread Starter darkallman

    (@darkallman)

    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 dbprefix_relevanssi AS relevanssi
    WHERE relevanssi.term = 'badjas'
    AND relevanssi.doc NOT IN (
    SELECT DISTINCT(tr.object_id)
    FROM dbprefix_term_relationships AS tr
    WHERE tr.term_taxonomy_id IN (68))
    AND relevanssi.doc NOT IN (22091,22202,22207,21957,22267,23004,23303,23304,23320,23328,23649,23738,23765,23777,23787,23860,23828,23906,24078,24080,24929,25058,25115,25119,25133,25155,25168,25726,24077,25773,23710,28966,30771,31088,31203,32520,32631,32758,32769,32780,33029,33668,33669,34948,35824,35857,35864,35804,33670,37821,37822,38272,32632,59257,53646,53638,32425,32283,29246,28382,28381,25391,24051,24001,23970,23715,23699,23645,33611,60009,23510,23485,23335,23733,23663,35163,38811,38810,38812,38813,32952,38808,38807,38806,34280,34279,34278,34268,32959,32955,32953,62678,32960,59682,65833,65834,34936,35150,35156,73165,73160,70133,67907,65645,74979,74981,29738,38047,74982,74983,74984,74990,74991,75231,75613,75615,34062,83804)
    AND ( relevanssi.doc IN (
    SELECT DISTINCT(posts.ID)
    FROM dbprefix_posts AS posts
    WHERE posts.post_type IN ('product') ) )
    ORDER BY tf DESC
    LIMIT 500

    When I run this query in phpmyadmin, it does return results. So why is avada not showing them…….strange.

    • This reply was modified 4 years, 7 months ago by darkallman.
    • This reply was modified 4 years, 7 months ago by darkallman.
    Plugin Author Mikko Saari

    (@msaari)

    Yeah, nothing particularly weird about this. Taxonomy 68 is blocked, it’s probably “out of stock”, and you have bunch of blocked posts but nothing weird.

    It’s possible Relevanssi is running in the background and fetching the correct results, but Avada is then using a custom query instead of the Relevanssi results. That’s why using post_types works, because it skips the template.

    This is something you might want to inquire from Avada customer support. If they hear from their users that you want to use Relevanssi, they can build better Relevanssi compatibility in the theme.

    Thread Starter darkallman

    (@darkallman)

    The strange thing is, there has not been an Avada update since yesterday.
    But Woocommerce did have an update…… So I’m reluctant to believe the issue is with Avada.
    Also, @missflibble is not using Avada, but a different theme.

    Plugin Author Mikko Saari

    (@msaari)

    Yes, and I have a Premium customer with a similar problem using Woodmart. So probably this is a WooCommerce issue somehow, which seems odd.

    If anybody has a staging environment where I could poke around with this, that would be helpful as setting up a good WooCommerce testing environment from scratch is a bit of a chore.

    I’ll dig deeper into this tomorrow, something has clearly changed for worse.

    Thread Starter darkallman

    (@darkallman)

    I have a staging site where you could poke around!

    Thread Starter darkallman

    (@darkallman)

    Done!

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘Product Search no longer working’ is closed to new replies.