Product unpublished but still in index and serach results

  • Posts: 315
  • Thank you received: 17
  • Hikashop Business
4 months 2 weeks ago #361272

-- HikaShop version -- : 5.0.4
-- Joomla version -- : 4

Using smart search. If I unpublish the product, it is still displayed in search results - not ok.
That result throws 404 (that is normal).
Am I missing something (setup, config...)?

Please Log in or Create an account to join the conversation.

  • Posts: 82653
  • Thank you received: 13318
  • MODERATOR
4 months 2 weeks ago #361274

Hi,

I'm not able to reproduce the issue on my end with HikaShop 5.0.4
When I unpublish a product via the HikaShop interface, the product doesn't appear in the search results of the Smart search, and if I then publish it again, it appears again.
There is nothing particular to setup.
However, I can think of ways for this to happen.
If you disabled the Smart search HikaShop products plugin in the Joomla plugins manager after indexing your products, everything you change in the products after this won't be taken into account by the Smart search.
Also, if the products are being unpublished via a custom plugin, a massaction, or a CSV import, the normal events of a product being updated might not be triggered. And in that case, the Smart search HikaShop products plugin won't be able to refresh the index.
However, in that case, if you do a full reindex of the content in the Smart search component, it should then have the proper state.

That's the issue with using an index. You can get better performances, and do things that would be impossible with a dynamic search (like the previous search system of Joomla, or HikaShop's filters), but when you search, you search in the index, not on the actual data. So if there is a synchronisation issue between the index and the actual data, you can get results like what you're describing, while this can't happen with a dynamic search.

Please Log in or Create an account to join the conversation.

  • Posts: 122
  • Thank you received: 3
  • Hikashop Business
4 months 2 weeks ago #361304

hallo,
when you have variants in a not published product, the variant must be unpublished either!
Do not click on the on / off buttons in the variants list, that doen't work
You must each variant open en unpublisch and safe in the variant screen on the right site.

Then it is OK. you don't get a search result anymore, so also no 404.

regards.

Please Log in or Create an account to join the conversation.

  • Posts: 315
  • Thank you received: 17
  • Hikashop Business
4 months 2 weeks ago #361315

Nicolas, thank you for explanation.
I think (after some tests) that this issue is related to this www.hikashop.com/forum/filters-search/90...esult-url-wrong.html
So lets solve that first.

Please Log in or Create an account to join the conversation.

  • Posts: 82653
  • Thank you received: 13318
  • MODERATOR
4 months 2 weeks ago #361305

Hi,

Thank you for your feedback.
Indeed, I had tested this with products without variants as you didn't say it was specific to products with variants before. That's why I couldn't reproduce the problem.
The publish/unpublish toggle on the variants listing doesn't trigger the onAfterProductUpdate event which is used by the smart search plugin to actually update the index, so that explains why it doesn't work properly with that toggle.
I'll make a patch for the next release of HikaShop so that this will work properly.

Please Log in or Create an account to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum