Search results don't work

Author Message

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

Simone D'Amico

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

Simone D'Amico

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.

Gaetano Giunta

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.

Principal Consultant International Business
Member of the Community Project Board

Simone D'Amico

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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 19:34:13
Script start
Timing: Jan 30 2025 19:34:13
Module start 'layout'
Timing: Jan 30 2025 19:34:13
Module start 'content'
Timing: Jan 30 2025 19:34:13
Module end 'content'
Timing: Jan 30 2025 19:34:13
Script end

Main resources:

Total runtime0.0270 sec
Peak memory usage8,192.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 588.1250151.2109
Module start 'layout' 0.00560.0044 739.3359220.6953
Module start 'content' 0.01000.0152 960.03131,005.6797
Module end 'content' 0.02520.0017 1,965.710937.9766
Script end 0.0269  2,003.6875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002910.6580140.0002
Check MTime0.00114.1081140.0001
Mysql Total
Database connection0.00072.477110.0007
Mysqli_queries0.003011.046130.0010
Looping result0.00000.045110.0000
Template Total0.00124.510.0012
Template load0.00093.514910.0009
Template processing0.00030.971610.0003
Override
Cache load0.00062.369210.0006
General
dbfile0.002910.620080.0004
String conversion0.00000.038040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs