Forums / Setup & design / view_parameters only works once

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

eZ debug

Timing: Jan 18 2025 11:08:13
Script start
Timing: Jan 18 2025 11:08:13
Module start 'content'
Timing: Jan 18 2025 11:08:13
Module end 'content'
Timing: Jan 18 2025 11:08:13
Script end

Main resources:

Total runtime0.1604 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 587.7266180.8359
Module start 'content' 0.00580.0043 768.562597.8828
Module end 'content' 0.01010.1502 866.4453528.3047
Script end 0.1604  1,394.7500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00342.1031200.0002
Check MTime0.00140.8618200.0001
Mysql Total
Database connection0.00070.442610.0007
Mysqli_queries0.115071.70401410.0008
Looping result0.00201.23091390.0000
Template Total0.150093.510.1500
Template load0.00070.448210.0007
Template processing0.149393.041910.1493
Override
Cache load0.00050.320410.0005
Sytem overhead
Fetch class attribute can translate value0.00150.946210.0015
XML
Image XML parsing0.00020.127210.0002
General
dbfile0.00372.2868200.0002
String conversion0.00000.003330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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