Forums / General / TemplateCompile enabled and attributes disappear

TemplateCompile enabled and attributes disappear

Author Message

Heath

Sunday 01 July 2007 10:35:50 am

<b>Long Title</b>

TemplateCompile setting enabled and attribute_view_gui attributes disappear!

<b>Summary</b>

Merely in writing this one detailed document, which would accurately present the problem both in text, screenshot, settings, supporting url; I found I had found a pattern in describing the problem which matched the output surrounding my use of a feature which I was not certain was completely supported ('{attribute_view_gui attribute=$node.object.data_map.$a}').

When you have to pay for support, I always recommend one communicate clearly in the first email. This drastically improves the context and speed of email support.

<b>Problem Description</b>

In the interest of prompt development of new features the following was added to the settings of this build. These settings have been known to disable as completely as possible all available cache systems (while it does appear to work very well there may be further settings which can disable further cache sub systems as of yet unknown).

File: <i>settings/override/site.ini.append.php</i>

<b>Contents Added</b>

[ContentSettings]
ViewCaching=disabled

[TemplateSettings]
TemplateCache=disabled
TemplateCompile=disabled
DevelopmentMode=disabled
DevelopmentMode=enabled
CacheThreshold=0

<b>Error Description</b>

If I turn off all of these settings (remove them) now that development is completed I get a rather nasty artifact. The attributes of the form would disappear!

The Templates with the error were the feedback form's datatype attributes (not all but most..)
Attributes of a form dynamically called from an array here is an example. The following ...

{def $attribs=array('accept_cc','need_equip','monthly_charges','average_charge','likely_method')}
{foreach $attribs as $a}<div>{attribute_view_gui attribute=$node.object.data_map.$a}</div>{/foreach}

<b>Solution Description</b>

Replace the direct calling of the name in the previous example with another way of doing the same act.

{foreach $attribs as $a}<div>{def $a_name=$node.object.data_map.$a}{attribute_view_gui attribute=$a_name}</div>{/foreach}

I might note that only the ezstring datatype was not affected by this 'negative feature' all other datatypes were affected by this problem.

<b>Conclusion</b>

I started this process to solve this problem first by writing an email to a fictional support provider. I quickly found that after less than 5 minutes of writing a single complete (very verbose) supporting text document I had found my own solution.

Now my problem is solved, hope this helps someone else, time for a free beer!

Cheers!

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Xavier Dutoit

Monday 02 July 2007 3:14:19 am

Hi,

I noticed that node.data_map works(ed) better than node.object.data_map on some cases, even if the data_map logically belongs to the object.

X+

http://www.sydesy.com

eZ debug

Timing: Jan 19 2025 15:22:53
Script start
Timing: Jan 19 2025 15:22:53
Module start 'content'
Timing: Jan 19 2025 15:22:53
Module end 'content'
Timing: Jan 19 2025 15:22:53
Script end

Main resources:

Total runtime0.2047 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.0054 589.0781180.8203
Module start 'content' 0.00540.0067 769.898498.0234
Module end 'content' 0.01210.1925 867.9219529.3750
Script end 0.2046  1,397.2969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00351.7025200.0002
Check MTime0.00140.6934200.0001
Mysql Total
Database connection0.00060.277910.0006
Mysqli_queries0.159377.81791410.0011
Looping result0.00130.61211390.0000
Template Total0.191993.810.1919
Template load0.00090.452410.0009
Template processing0.191093.312410.1910
Override
Cache load0.00060.281410.0006
Sytem overhead
Fetch class attribute can translate value0.00080.370310.0008
XML
Image XML parsing0.00020.101610.0002
General
dbfile0.00452.1900200.0002
String conversion0.00000.003030.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