Keyword

Re: Smart Search Shows Unpublished Items in Results

  • foof132
  • foof132's Avatar Topic Author
  • Offline
  • New Member
More
5 years 8 months ago #128696 by foof132
foof132 created the topic: Smart Search Shows Unpublished Items in Results
Just wondering if anyone has run into the issue of Smart Search showing K2 items that are set to unpublished in the Indexed Content list.

I'm using Joomla 2.5.20 and K2 2.6.8.

Thanks in advance.

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

  • foof132
  • foof132's Avatar Topic Author
  • Offline
  • New Member
More
5 years 8 months ago - 5 years 8 months ago #128697 by foof132
foof132 replied the topic: Re: Smart Search Shows Unpublished Items in Results
I believe I found a fix:

github.com/joomla/joomla-cms/pull/3362/files

In components/com_finder/models/search.php, add after line 241:
$query->where($db->quoteName('l.published') . ' = 1');

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

More
5 years 8 months ago #128698 by Lefteris
Lefteris replied the topic: Re: Smart Search Shows Unpublished Items in Results
Hi. Hacking core files is not a good idea. You will lose your modifications with the next update.

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/

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

More
2 weeks 2 days ago - 2 weeks 2 days ago #174702 by Ralf Longwitz
Ralf Longwitz replied the topic: Re: Smart Search Shows Unpublished Items in Results
So, what is the solution then? Other than deleting K2 items rather than unpublishing?
Thanks!

(For me its standard search)
Last edit: 2 weeks 2 days ago by Ralf Longwitz.

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

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
More
2 weeks 2 days ago #174706 by Fotis
Fotis replied the topic: Re: Smart Search Shows Unpublished Items in Results
Smart Search creates a "snapshot" of published K2 items in its index. Until it refreshes its index, if you change the published state of some K2 item, it will not reflect immediately.

If, as you say, this occurs in standard Joomla search (the com_search component), then this could relate to aggressive server-side caching, because upon showing the results, Joomla does a "GET" request, which can easily be cached by software like Varnish or Nginx (if it's setup in your server of course).

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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


Powered by Kunena Forum