[Skip to main content](#vessel-content)

#   Product unpublished but still in index and serach results

##

- **[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")**
- [![mojweb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5128-mojweb "View mojweb's Profile") Topic Author
- [ Offline](/forum/user/5128-mojweb)

Less More

- Posts: 432
- Thank you received: 22
-

2 years 5 months ago [\#361272](#361272) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  *[Product unpublished but still in index and serach results](/forum/45-filters-search/908220-product-unpublished-but-still-in-index-and-serach-results#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...)?")* was created by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")*

-- 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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2ZpbHRlcnMtc2VhcmNoLzkwODIyMC1wcm9kdWN0LXVucHVibGlzaGVkLWJ1dC1zdGlsbC1pbi1pbmRleC1hbmQtc2VyYWNoLXJlc3VsdHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86363
- Thank you received: 14296
-
-

2 years 5 months ago [\#361274](#361274) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product unpublished but still in index and serach results](/forum/45-filters-search/908220-product-unpublished-but-still-in-index-and-serach-results#361274 "-- 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...)?")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2ZpbHRlcnMtc2VhcmNoLzkwODIyMC1wcm9kdWN0LXVucHVibGlzaGVkLWJ1dC1zdGlsbC1pbi1pbmRleC1hbmQtc2VyYWNoLXJlc3VsdHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mariussport](/forum/user/9713-mariussport "View mariussport's Profile")**
- [![mariussport's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/car.gif)](/forum/user/9713-mariussport "View mariussport's Profile")
- [ Offline](/forum/user/9713-mariussport)
- Test fase

Less More

- Posts: 122
- Thank you received: 3
-
-
-
- [](http://bal.mariusklabbers.nl)
-

2 years 5 months ago [\#361304](#361304) by [mariussport](/forum/user/9713-mariussport "View mariussport's Profile")  Replied by *[mariussport](/forum/user/9713-mariussport "View mariussport's Profile")* on topic *[Product unpublished but still in index and serach results](/forum/45-filters-search/908220-product-unpublished-but-still-in-index-and-serach-results#361304 "-- 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...)?")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2ZpbHRlcnMtc2VhcmNoLzkwODIyMC1wcm9kdWN0LXVucHVibGlzaGVkLWJ1dC1zdGlsbC1pbi1pbmRleC1hbmQtc2VyYWNoLXJlc3VsdHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")**
- [![mojweb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5128-mojweb "View mojweb's Profile") Topic Author
- [ Offline](/forum/user/5128-mojweb)

Less More

- Posts: 432
- Thank you received: 22
-

2 years 5 months ago [\#361315](#361315) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[Product unpublished but still in index and serach results](/forum/45-filters-search/908220-product-unpublished-but-still-in-index-and-serach-results#361315 "-- 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...)?")*

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](https://www.hikashop.com/forum/filters-search/907770-smart-search-result-url-wrong.html)
So lets solve that first.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2ZpbHRlcnMtc2VhcmNoLzkwODIyMC1wcm9kdWN0LXVucHVibGlzaGVkLWJ1dC1zdGlsbC1pbi1pbmRleC1hbmQtc2VyYWNoLXJlc3VsdHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86363
- Thank you received: 14296
-
-

2 years 5 months ago [\#361305](#361305) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product unpublished but still in index and serach results](/forum/45-filters-search/908220-product-unpublished-but-still-in-index-and-serach-results#361305 "-- 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...)?")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2ZpbHRlcnMtc2VhcmNoLzkwODIyMC1wcm9kdWN0LXVucHVibGlzaGVkLWJ1dC1zdGlsbC1pbi1pbmRleC1hbmQtc2VyYWNoLXJlc3VsdHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.067 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
