• Hi Mikko,
    I had problems with the default WordPress search results so I searched for a better solution. I came across your plugin, installed it and it works great, except for one thing (at least for now).

    In the site I’m developing (on my local machine) I use WPML for translations to a second language, Dutch in this case. The default language is English.

    When I add a product to my site and translate it to Dutch the product is not showing when searching for the Dutch (translated) category name. Of course I perform the search from a Dutch page. An English search from an English page is working well.

    When I delete the index and reindex from the settings page of your plugin. The product shows up fine. The option for WPML compatibility is checked.

    What is wrong here?

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

    (@msaari)

    Does it work if instead of rebuild the index, you just save the translated post one more time after you’re done with it?

    Thread Starter Adri Oosterwijk

    (@adri-oosterwijk)

    Hi Mikko, Thanks for your reply.

    That is working. What do I have to do to get it right the first time I save the translation?

    HTH

    Adri

    Plugin Author Mikko Saari

    (@msaari)

    I don’t know. The initial translation doesn’t somehow trigger Relevanssi indexing. I’m not familiar with the inner workings of WPML, so I can’t tell why that is working the way it is. It may be the category is being assigned to the post after Relevanssi indexes the post.

    Since WPML is a Premium product, I can’t get familiar with it. I can support Polylang better, as it’s a free product and I can actually test things with it.

    Thread Starter Adri Oosterwijk

    (@adri-oosterwijk)

    Hi Mikko,
    That brings us not a lot further… ??
    I did however started a thread over at WPML.org and you can read it here: https://wpml.org/forums/topic/no-results-when-searching-in-translated-product-categories/

    They have a compatibility team to make plugins 100% WPML compatible. I can imagine that it is important for your plugin to be also because wpml is a widely used multilingual plugin.

    Like I said over at WPML. The workaround is doable but we don’t win any beauty contest with it. So I hope there is a way to correct this together.

    Plugin Author Mikko Saari

    (@msaari)

    Ah, you never mentioned the YITH WooCommerce Ajax Search plugin here. I took a look at that, and that definitely doesn’t support Relevanssi. So you’re never going to see Relevanssi results when you use the Ajax Search.

    If you remove the Ajax Search plugin, does that fix the issue at hand?

    Thread Starter Adri Oosterwijk

    (@adri-oosterwijk)

    Hi Mikko, no I did not mention the yith plugin, simply because I did not thought on it. Sorry. I tried your suggestion but sadly, no avail. What I did was: changed the code in the header.php file to create a widget area and added the native (woocommerce?) product search widget.

    After the first translation save the product did not came up when searching in for a dutch category name. After saving the translation a second time it did came up.

    In other words: the same result as with the YITH plugin installed and active.
    What to do next? I noticed that WPML was downloading the Duplicator package I had prepared to research the issue also. We can wait and see were they com up with or do you have another suggestion?

    Plugin Author Mikko Saari

    (@msaari)

    It’s a question of when the category is added to the post, then. That happens for some reason after the post is saved and Relevanssi indexes it.

    Why is that, is up to the WPML team. But you can tell them that’s the issue: the translated category is not set when wp_insert_post hook fires and Relevanssi indexes the post. Relevanssi runs on priority 99, so if the category is added after that, Relevanssi does not see it.

    Thread Starter Adri Oosterwijk

    (@adri-oosterwijk)

    Hi Mikko, thanks again for your reply. I will add your last reply as a quote to the thread over at WPML. I will keep you posted. I think that solving this issue will help a lot of other users as well. With a big number of installs of your plugin and WPML there must be a lot of users wo uses both.

    Best wishes,

    Adri

    Thread Starter Adri Oosterwijk

    (@adri-oosterwijk)

    Hi Mikko,

    Below the response I got from WPML this morning:

    I debugged the issue in depth and can replicate the problem on your site, it shows the category while searching in secondary language missing the list of newly added products. On the other side on a fresh installation, it doesn’t show any search results at all.

    So, I have forward the details to our Themes & Plugins Compatibility Team and they will contact the author. Please note that this process may take a while as it depends on how soon the author will reply to our efforts to contact him.

    Just to inform you. Maybe it is beneficial to you.
    Keep up the good work on your superb plugin! Thumbs up.

    Best regards,

    Adri

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Indexing not working properly when using WPML’ is closed to new replies.