view_parameters only works once

Author Message

Daniel Guerrier

Friday 16 December 2005 9:39:26 pm

For some unknown reason this code only works once in linux. Works fine on windows.
This code:

<?xml version="1.0" encoding="UTF-8"?>
<media>
{def $episode=fetch( 'content', 'object', hash( 'object_id', $view_parameters.content_id ) )}
<item>
<name>{$episode.data_map.name.content|wash()}</name>
<description>{$episode.data_map.shortdescription.content|wash()}</description>
<path>
{let site_url=ezini('SiteSettings','SiteURL') file_path=$episode.data_map.file.content.filepath}
{concat('http://', $site_url, '/', $file_path)}
{/let}
</path>
<thumbnail>
{let site_url=ezini('SiteSettings','SiteURL') image_path=$episode.data_map.thumbnail.content[original].url}
{concat('http://', $site_url, '/', $image_path)}
{/let}
{/def}
</thumbnail>
</item>
</media>

is called with this url

http://www.example.com/layout/set/episodexml/(content_id)/117

works on the first request. every request after that does not get the the content_id parameter until the content cache is cleared. This is the debug error

Error: eZTemplate @ design/s2h/templates/episodexml.tpl:18[0]  	Dec 17 2005 00:39:31

parser error @ design/s2h/templates/episodexml.tpl:18[0]
End tag "def" for function which does not accept children, ignoring tag

Error: eZTemplate 	Dec 17 2005 00:39:31

Unknown template variable 'view_parameters' in namespace ''

Error: eZModuleFunctionInfo::execute content::object 	Dec 17 2005 00:39:31

Missing parameter 'object_id' for function 'object' in module 'content'

Error: eZTemplate @ design/s2h/templates/episodexml.tpl:5[6] 	Dec 17 2005 00:39:31

Cannot retrieve attribute of a NULL

Error: eZTemplate @ design/s2h/templates/episodexml.tpl:6[13] 	Dec 17 2005 00:39:31

Cannot retrieve attribute of a NULL

Error: eZTemplate @ design/s2h/templates/episodexml.tpl:8[0] 	Dec 17 2005 00:39:31

Cannot retrieve attribute of a NULL

Error: eZTemplate @ design/s2h/templates/episodexml.tpl:13[0] 	Dec 17 2005 00:39:31

Cannot retrieve attribute of a NULL

using 3.7 on apache2/fedora2/php4.4

again it gets the url param the first time but will not receive the param again until the content cache is cleared

Daniel Guerrier

Saturday 17 December 2005 12:56:59 pm

I reduced the template down to just outputing the view_parameters.myparam and it only gets passed once per variable until I remove the content cache. The permissions are set to 770 and owned by the webserver user. That part is working fine. The only error when debug is turned on is the error stating the parameter is null on the second execution. any idea what can be the problem. again the same code works fine on windows.

Daniel Guerrier

Saturday 17 December 2005 1:12:07 pm

I've reduced everything to this and it wont take in the parameter if a cache entry exists.

{def $ep_id=$view_parameters.content_id}
{$ep_id}
{undef}

I'm getting this
Error: eZTemplate @ design/s2h/templates/episodexml.tpl:1[0] Dec 17 2005 16:12:09
Unknown template variable 'view_parameters' in namespace ''

Daniel Guerrier

Wednesday 21 December 2005 1:38:26 pm

Are any of the ez folks concerned about this one?
I would think that an issue that seems this important would get more attention.

Paul Forsyth

Thursday 22 December 2005 12:32:23 am

Try filing a bug for this.

Paul

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