• Hi,

    We’re not really sure what’s happened by the product search results now shows nothing.

    We’ve updated to latest Relevanssi version and rebuilt index and still nothing.

    Not sure if relevant but database table shows all terms as type=post. Should these be product?

    Can you help?

    https://wordpress.org/plugins/relevanssi/

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

    (@msaari)

    No, products are also posts.

    If you add &post_types=product to end of the search page URL, do you see products?

    Recently there’s been some issues with Relevanssi and WooCommerce as documented here. This may be related to that. I’m slowly working on fixing that, but as I don’t use WooCommerce myself, I can’t test these issues myself so it’s a bit of slow going.

    Thread Starter infosws

    (@nicksws)

    We do have &post_type=product on the end of the URL.

    It suddenly stopped working yesterday morning and we hadn’t updated any plugins at all.

    We’re trying to restore a backup to a new location to also check what changed.

    Plugin Author Mikko Saari

    (@msaari)

    If you can figure out what changed, that would be helpful indeed.

    Thread Starter infosws

    (@nicksws)

    Hi,

    We’ve not managed to find anything that changed.
    It suddenly started to work again this morning although the results aren’t correct.

    We have global attributes (e.g. for artist first name and surname) and the AND search doesn’t seem to work for it.
    e.g.
    “David Bowie” should find those with “David Bowie” in the title and also first=David AND surname=Bowie.
    But the results only show if the title shows the full searched term (“David Bowie”).

    If we switch it to OR, it will show David Essex and others too.

    Hope this helps.

    Plugin Author Mikko Saari

    (@msaari)

    Do the results change if you disable Relevanssi, ie. are they actually Relevanssi results? That’s a good thing to check.

    Global attributes – are they stored in custom fields?

    Thread Starter infosws

    (@nicksws)

    If we disable Relevanssi the normal WordPress search works but it doesn’t show results where the searched term is in the product attributes.

    Theses are normal product attributes, created globally and attached to products.

    For a very short time, it suddenly started to work even though we’ve changed nothing to make it work.
    Now it’s stopped working again.

    Plugin Author Mikko Saari

    (@msaari)

    I don’t know what a product attribute is, I don’t use WooCommerce. It’s stored somewhere in the WP database, and where that is, determines how Relevanssi finds it and indexes it.

    In any case, it’s quite hard for me to tell what’s wrong with your site. If you buy a support license, I can take a look at the site and can help more. Now, without even seeing the site, there’s little I can do to help.

    Thread Starter infosws

    (@nicksws)

    We’ll have to look for another plugin that works with WooCommerce.

    We did some more research and found that Revelanssi doesn’t work with the WooCommerce sorting options at all, even the built in “popularity” or “price: low to high” sorts.

    Quite surprised it doesn’t work with WooCommerce.

    Plugin Author Mikko Saari

    (@msaari)

    Albert

    (@planetshaker)

    Just wanted to say that we experience the same problem with only some words, other search words are working. We need to deactivate Relevanssi now until there is a solution to this problem. Thanks for all your efforts.

    Subrata Sarkar

    (@subrataemfluence)

    I may be a late comer to this thread. I have created a custom search form and search result page for my website. The custom search form (searchform.php) looks like this:

    
    <form role="search" method="get" action="<?php echo home_url('/') ?>" >
        <input type="text" class="form-control" placeholder="Enter keyword to search..." value="<?php echo get_search_query(); ?>" name="s" title="Search" />
        <input type="hidden" name="post_type[]" id="post_type" value="trips" />
        <input type="hidden" name="post_type[]" id="post_type" value="package_tour" />
        <input type="hidden" name="post_type[]" id="post_type" value="hotel-info" />
        <input type="hidden" name="post_type[]" id="post_type" value="travelog" />
        <input type="hidden" name="post_type[]" id="post_type" value="product" />
    </form>
    

    All other post_types are working fine and returning results except “product”.

    And in search.php I have checked current post_type inside the loop manually because I have to deal with mixed result suppose to come from different post types.

    
    if(have_posts()) {
       global $wp_query;
       while(have_posts()) : the_post();
          $postType = get_post_type(get_the_ID());
          if($postType == 'trips') {
            //I am getting result
          }
          elseif($postType == 'travelog') {
            //I am getting result
          }
         elseif($postType == 'product) {
            // Not getting any result from product post_type.
         }
       endwhile;
    }
    

    When I am searching with a keyword which I know will not bring up anything else except one product, the block if(have_posts()) is not at all executing as if there is no post found at all.

    I looked at the URL and it appends post_type=product at the end fine.

    I also checked Visibility option in Product edit page. The option Catalog/search is selected by default.

    I am not using “Relevanssi”.

    What is wrong in my approach?

    snoofs

    (@gustavoleal)

    Hello!!
    I’m facing the same problem.
    The search page indentifies the results, shows the horizontal cascate menu, the “Showing all X results” message and ordenation drop down list but doesn’t show the products.
    I don’t know what to do. There’s just it for my store start working.

    I am now seeing this same problem (WooCommerce results no longer showing in search results) on my test system where I am updating to WooCommerce 3.0. (Version 1.15.0.1 has the same behavior as version 1.14.9.) On my production system, where I am still running WooCommerce 2.6.13, Relevanssi 1.14.9 is working fine. If I append the previously-advised “&post_types=product” on my test system, I get nothing at all.

    Has anyone else observed this problem with WooCommerce 3.0? If you have both Relevanssi and WooCommerce 3.0 working, I’d love to know about that too.

    I’m also going to post this issue on the Relevanssi support page, since we have Relevanssi Premium … Cindy

    And deactivating Relevanssi works, right? I am having the same issue!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘WooCommerce products not longer showing in results’ is closed to new replies.