Logical operators in templates: registration bug?

Author Message

Paul Borgermans

Monday 11 August 2003 10:13:49 am

Apparently, (some of) the logical operators do not seem to work in 3.1 and all svn versions up to now:

for example

{section show=(fetch(content,list_count,hash(parent_node_id,$module_result.node_id))|gt(0))}
yes
{section-else}
no
{/section}

results always in "no"

or even

{let a=3}
{section show=($a|gt(0))}
yes
{section-else}
no
{/section}
{/let}

also displays no as the output.

Can anyone confirm this and other logical operators that do not work ("and" for instance)?

It seems that the operators never get executed as if they are not registered (but nothing of that in the debug output)

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

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 31 2025 04:33:59
Script start
Timing: Jan 31 2025 04:33:59
Module start 'layout'
Timing: Jan 31 2025 04:33:59
Module start 'content'
Timing: Jan 31 2025 04:33:59
Module end 'content'
Timing: Jan 31 2025 04:33:59
Script end

Main resources:

Total runtime0.0198 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.2656151.2266
Module start 'layout' 0.00650.0038 739.492236.6953
Module start 'content' 0.01030.0070 776.187590.1875
Module end 'content' 0.01740.0024 866.375029.9922
Script end 0.0198  896.3672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003115.9027140.0002
Check MTime0.00157.5000140.0001
Mysql Total
Database connection0.00073.443710.0007
Mysqli_queries0.003919.735230.0013
Looping result0.00000.090310.0000
Template Total0.00189.110.0018
Template load0.00157.663710.0015
Template processing0.00031.348110.0003
Override
Cache load0.00094.776110.0009
General
dbfile0.00125.977480.0001
String conversion0.00000.044540.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