information collector templates and $collection_attributes

Author Message

Ben Peter

Tuesday 06 December 2005 12:59:20 am

Greetings,

on a custom full template for an information collecting class, I am running intro a problem with $collection_attributes.

As far as I have understood, after a form submit, this _should_ contain an array with the information collectors' attribute_ids as the keys and an ezinformationcollectionattribute Object as the value.

The keys are OK and what I would expect, but the objects are all the same: they all represent the last information collector in the class definition. The type of that last attribute does not seem to make a difference.

From how I read the collect templates in design/standard/templates/content/datatype/collect/, I need to pass in $collection_attributes with attribute_view_gui, so that a value that was entered is kept over a failed validation, but this will only work for the last field in the form.

I am using (as far as I can see) the standard approach to collect information:

- Created a new class definition which contains information collecting attributes
- Create an override template for that class, in which I am using the following code to show the form fields

{attribute_view_gui attribute=$node.object.data_map.message collection_attributes=$collection_attributes}

- Added the needed hidden fields to the form
- Created overrides for the mail and the collected info view (but these do not come into play here).

I am using eZ publish 3.7.2

Cheers,
Ben

Ben Peter

Tuesday 06 December 2005 1:02:25 pm

Just for completeness' sake: the problem is already fixed on the 3.7 branch. For those who come across this problem, have a look at. Just a small change.

http://pubsvn.ez.no/viewcvs/ezp?rev=14261&view=rev

Cheers,
Ben

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 00:27:55
Script start
Timing: Jan 19 2025 00:27:55
Module start 'layout'
Timing: Jan 19 2025 00:27:55
Module start 'content'
Timing: Jan 19 2025 00:27:56
Module end 'content'
Timing: Jan 19 2025 00:27:56
Script end

Main resources:

Total runtime0.8042 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0095 588.1719152.6563
Module start 'layout' 0.00950.0039 740.828139.5078
Module start 'content' 0.01350.7894 780.3359464.2031
Module end 'content' 0.80290.0013 1,244.53918.4063
Script end 0.8041  1,252.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3953160.0002
Check MTime0.00130.1559160.0001
Mysql Total
Database connection0.00170.212410.0017
Mysqli_queries0.754393.8003520.0145
Looping result0.00050.0612500.0000
Template Total0.769695.720.3848
Template load0.00230.282920.0011
Template processing0.767395.416520.3837
Template load and register function0.00010.012010.0001
states
state_id_array0.00090.114110.0009
state_identifier_array0.00060.072620.0003
Override
Cache load0.00190.2356240.0001
Sytem overhead
Fetch class attribute can translate value0.00050.067010.0005
Fetch class attribute name0.00160.204630.0005
XML
Image XML parsing0.00050.067010.0005
class_abstraction
Instantiating content class attribute0.00000.001340.0000
General
dbfile0.00090.1136160.0001
String conversion0.00000.001740.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/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
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs