Wednesday 01 July 2009 6:38:43 am
Hello everybody, Today I have a problem with between view_parameters and the caching system. I know for sure that a cached version of the content is created for each call with different view parameters. With this, one can make a pagination inside a container node view. But in my today's case, when I enable the cache and click on a page number (given by the standard navigator/google.tpl), it always displays the first page. I thought it was on the fetch level, but all seems fine as it works without caching enabled. Then I checked the value of the variable I compute from the view parameter offset, and it doesn't change when calling the page with or without view parameters. So I figured that it was the computation caching that froze the offset. Then I checked the $view_parameters.offset value itself just to make sure, and the value doesn't change either ! So, after I clear the view cache, if I click on "http://.../Node/(offset)/30" link, the $view_parameters.offset value is correct (at 30), but if I click immediately after on the "http://.../Node" link, the $view_parameters.offset value stays at 30. Vice versa, if I clear the cache, click on "http://.../Node" link, the $view_parameters.offset value is correct (at 0), and then if I click on "http://.../Node/(offset)/30" link, the value stays at 0. I searched thoroughly the forum for an answer, but I didn't find the same exact problem. Usually it's problems like "$view_parameters missing in included templates" or "Limit and Offset parameters missed in fetch". What should I check now to make sure it's not a bug but (probably) a miss from me ? (The pagination works perfectly in admin panel, with cache enabled)
eZ Publish personal project : http://www.aeriesguard.com [fr]
|