extract_left and template compiling

Author Message

Laurent BOURREL

Monday 24 September 2007 5:26:54 am

Hi all,

I have a strange behavior with the <b>extract_left</b> operator.

This is ok :

{'/'|ezroot(no, full)|extract_left(30)}

I have an error with the following, <b>only with TemplateCompile=enabled</b> :

{def $tmppos = 30}
{'/'|ezroot(no, full)|extract_left($tmppos)}

=> Parse error: syntax error, unexpected '%' in... my php compiled template

Can't i use a variable as a parameter !?

I've got this problem on a 3.9.1 and 3.9.2... i'm going to do my own operator, but what a shame ! By the way, it's the same problem with <i>extract</i>

Any ideas ?

André R.

Tuesday 25 September 2007 12:49:03 am

Could you write a bug report on this one?
Seems to be a bug in the generated template compile code in the operator.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Laurent BOURREL

Tuesday 25 September 2007 5:26:52 am

Done !
#id = 01149

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 19 2025 03:40:45
Script start
Timing: Jan 19 2025 03:40:45
Module start 'layout'
Timing: Jan 19 2025 03:40:45
Module start 'content'
Timing: Jan 19 2025 03:40:45
Module end 'content'
Timing: Jan 19 2025 03:40:45
Script end

Main resources:

Total runtime0.0154 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.1797152.6250
Module start 'layout' 0.00530.0032 741.804739.4453
Module start 'content' 0.00850.0047 781.250089.4609
Module end 'content' 0.01310.0022 870.710930.3047
Script end 0.0153  901.0156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002717.3374140.0002
Check MTime0.00116.9964140.0001
Mysql Total
Database connection0.00074.836010.0007
Mysqli_queries0.002314.796830.0008
Looping result0.00000.110210.0000
Template Total0.001710.810.0017
Template load0.00106.215810.0010
Template processing0.00074.556710.0007
Override
Cache load0.00074.466710.0007
General
dbfile0.00031.803480.0000
String conversion0.00000.065240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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