Forums / General / Search results don't work
Simone D'Amico
Wednesday 12 January 2011 9:08:00 am
Hi,
I've a strange problem with search module. When I make the first search on front-end it works fine but when I try to make another seach with a different keyword, eZ returns the same results of first search.
In the address I've the new keyword but in the search field I've the old keyword with old results.
How can I resolve the problem?
Gaetano Giunta
Wednesday 12 January 2011 9:35:34 am
You might have a cache block in your search template
Principal Consultant International Business Member of the Community Project Board
Wednesday 12 January 2011 9:40:56 am
No!
I've copied the ezwebin default template in my design folder.
Abdelkader RHOUATI
Thursday 13 January 2011 3:49:33 am
Hello,
Verify your pagelayout.tpl, perhaps you have put a cache block for "$module_result.content" ?
TKS
Abdelkader RHOUATI Blog (french) : http://arhouati.com ---- Extension arh_jdebug : EzDebug using jquery
Bertrand Dunogier
Friday 14 January 2011 3:06:25 am
You might wanna enable DebugOutput + ShowUsedTemplates, and see what messages / templates you get during the first run and the next ones. This should point you to the right direction.
Bertrand Dunogier eZ Systems Engineering, Lyon http://twitter.com/bdunogier http://gplus.to/BertrandDunogier
Friday 14 January 2011 4:09:50 am
The issue depends from this snippet:
{cache-block keys=array( $module_result.uri, $basket_is_empty, $current_user.contentobject_id, $extra_cache_key )}
The code is contained in pagelayout.tpl inside <head> tags. When I delete the code, the search form works fine.
Friday 14 January 2011 5:11:39 am
Adding a cache-block around the {$module_result.content} block in the pagelayout is considered very bad practice. You already have the view cache taking care of that.
Friday 14 January 2011 6:05:58 am
I've not added the cache-block around that block but I've only added the block above inside <head> tags as the ezwebin extension does.