Examples from the book: Ez publish basics

Author Message

Ciaran McGrath

Friday 07 July 2006 8:06:30 am

Hi,

I've been trying to use one of the examples from the new book but I'm getting an error when using the simple menu example from page 138

Here's the line of code:

{def $elements = fetch( content, list, hash( parent_node_id, 2, class_filter_type, include, class_filter_array, array( 'folder' ) )}

And here's the error message I get in the debug mode

parser error @ design/mcg/templates/pagelayout.tpl:22
($) expected at [fetch( content, list, hash( parent_node_id, 2, class_filter_type, include, class_filter_array, array( 'folder' 
) )]

Please help. I'm totally confused by this system.!

André R.

Friday 07 July 2006 8:14:52 am

Count number of "(", then count number of ")"

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

Ciaran McGrath

Friday 07 July 2006 8:38:29 am

I really should have spotted that!

There are a quite a few errors in just that one example.

It's going to be a long night :-(

Thanks for your help

Jennifer Zickerman

Thursday 24 August 2006 4:43:06 pm

Hello. Thanks for pointing out these errors. I've created an Errata page for the book at http://ez.no/products/books/ez_publish_basics/ez_publish_basics_errata and posted a corrected version of the code snippet.

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 16:03:22
Script start
Timing: Jan 18 2025 16:03:22
Module start 'layout'
Timing: Jan 18 2025 16:03:22
Module start 'content'
Timing: Jan 18 2025 16:03:23
Module end 'content'
Timing: Jan 18 2025 16:03:23
Script end

Main resources:

Total runtime0.8547 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 592.1172152.6406
Module start 'layout' 0.00570.0027 744.757839.4766
Module start 'content' 0.00850.8450 784.2344576.8984
Module end 'content' 0.85350.0012 1,361.132812.1250
Script end 0.8547  1,373.2578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4078160.0002
Check MTime0.00130.1536160.0001
Mysql Total
Database connection0.00070.083510.0007
Mysqli_queries0.808494.5857620.0130
Looping result0.00060.0661600.0000
Template Total0.822296.220.4111
Template load0.00210.247120.0011
Template processing0.820195.944720.4100
Template load and register function0.00010.010310.0001
states
state_id_array0.00180.208810.0018
state_identifier_array0.00090.103820.0004
Override
Cache load0.00180.2051200.0001
Sytem overhead
Fetch class attribute can translate value0.00040.050130.0001
Fetch class attribute name0.00110.128950.0002
XML
Image XML parsing0.00080.099330.0003
class_abstraction
Instantiating content class attribute0.00000.001250.0000
General
dbfile0.00080.0904170.0000
String conversion0.00000.001240.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs