This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » General » Search results don't work

Search results don't work

Search results don't work

Wednesday 12 January 2011 6:08:00 pm - 7 replies


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?

Wednesday 12 January 2011 6:35:34 pm

You might have a cache block in your search template

Wednesday 12 January 2011 6:40:56 pm


I've copied the ezwebin default template in my design folder.

Thursday 13 January 2011 12:49:33 pm


Verify your pagelayout.tpl, perhaps you have put a cache block for "$module_result.content" ?


Friday 14 January 2011 12:06:25 pm

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.

Friday 14 January 2011 1:09:50 pm

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 2:11:39 pm

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 3:05:58 pm

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.


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from