- Posts: 7
COMMUNITY FORUM
Re: Smart Search Shows Unpublished Items in Results
- foof132
- Topic Author
- Offline
- New Member
Less
More
10 years 6 months ago #128696
by foof132
Smart Search Shows Unpublished Items in Results was created by foof132
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.
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
10 years 6 months ago - 10 years 6 months ago #128697
by foof132
Replied by foof132 on 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:
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.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
10 years 5 months ago #128698
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on 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.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Ralf Longwitz
- Offline
- Junior Member
Less
More
- Posts: 35
4 years 9 months ago - 4 years 9 months ago #174702
by Ralf Longwitz
Replied by Ralf Longwitz on 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)
Thanks!
(For me its standard search)
Last edit: 4 years 9 months ago by Ralf Longwitz.
Please Log in or Create an account to join the conversation.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6218
4 years 9 months ago #174706
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on 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, 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).
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.