Forums / Setup & design / information collector templates and $collection_attributes

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

eZ debug

Timing: Jan 31 2025 05:30:55
Script start
Timing: Jan 31 2025 05:30:55
Module start 'content'
Timing: Jan 31 2025 05:30:55
Module end 'content'
Timing: Jan 31 2025 05:30:55
Script end

Main resources:

Total runtime0.1336 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 588.1875180.7969
Module start 'content' 0.00510.0068 768.984494.1016
Module end 'content' 0.01200.1216 863.0859523.9219
Script end 0.1335  1,387.0078 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00332.4573200.0002
Check MTime0.00130.9544200.0001
Mysql Total
Database connection0.00060.416110.0006
Mysqli_queries0.087465.43771410.0006
Looping result0.00110.79651390.0000
Template Total0.121290.710.1212
Template load0.00090.678710.0009
Template processing0.120289.988110.1202
Override
Cache load0.00060.470910.0006
Sytem overhead
Fetch class attribute can translate value0.00070.506710.0007
XML
Image XML parsing0.00030.190010.0003
General
dbfile0.01057.8478200.0005
String conversion0.00000.003730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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