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
|