Weird behavior or bug?

Author Message

Massimiliano Bariola

Thursday 04 August 2005 4:16:15 am

    {def $dataodierna = gettime(currentdate())}
    {def $nextmonth = $dataodierna.month}
    {def $nextyear = $dataodierna.year}
    {if $dataodierna.month|eq(12)}
        {set $nextmonth = 1}
        {set $nextyear = $nextyear|inc(1)}
    {else}
        {set $nextmonth = $nextmonth|inc(1)}
    {/if}
    {if $dataodierna.month|count_chars|eq(1)}
{*the following line results in an error*}
        {set $dataodierna.month = concat('0', $dataodierna.month)}
    {/if}
    {if $nextmonth|count_chars|eq(1)}
        {set $nextmonth = concat('0', $nextmonth)}
    {/if}

the above snippet of tpl-code gives this error:

parser error @ extension/wt/design/standard/templates/wt/classifiche.tpl:69
Empty variable name at [.month = concat('0', $dataodierna.month)]

which seems pretty weird to me, because $dataodierna does exist (I use it elsewhere in my code to set other values, which get correctly set).

Bug or my mistake ?

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 18 2025 15:50:42
Script start
Timing: Jan 18 2025 15:50:42
Module start 'layout'
Timing: Jan 18 2025 15:50:42
Module start 'content'
Timing: Jan 18 2025 15:50:43
Module end 'content'
Timing: Jan 18 2025 15:50:43
Script end

Main resources:

Total runtime1.0680 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 589.0078152.6094
Module start 'layout' 0.00480.0020 741.617239.4141
Module start 'content' 0.00671.0568 781.0313441.0547
Module end 'content' 1.06350.0045 1,222.08598.1875
Script end 1.0679  1,230.2734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00280.2644160.0002
Check MTime0.00120.1132160.0001
Mysql Total
Database connection0.00070.070010.0007
Mysqli_queries1.026496.1063460.0223
Looping result0.00050.0424440.0000
Template Total1.039297.320.5196
Template load0.00210.200820.0011
Template processing1.037197.104620.5185
Template load and register function0.00010.008710.0001
states
state_id_array0.00130.126210.0013
state_identifier_array0.00170.163920.0009
Override
Cache load0.00170.1598100.0002
Sytem overhead
Fetch class attribute can translate value0.00060.055410.0006
Fetch class attribute name0.00130.124820.0007
XML
Image XML parsing0.00050.048010.0005
class_abstraction
Instantiating content class attribute0.00000.000520.0000
General
dbfile0.00140.1330170.0001
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs