Forums / Extensions / eZ Flow / Timeline and blocks

Timeline and blocks

Author Message

Anja Lundin

Monday 18 May 2009 7:07:06 am

Hi!
I've been working to solve a problem we have with the timeline for some time now and today I finally found out what the trouble is.

The problem was that every time we tried to use the timeline we got the javascript error:
YAHOO.util.Dom.get( blockID ).innerHTML is null

First of all, in the zone/ourzonetemplate.tpl I noticed that the

<div id="address-{$block.zone_id}-{$block.id}">

was removed, and it must not be removed if we want to use the timeline. The timeline uses the id of the div to recognise the blocks.

Second: we have a dynamic block which is shown sometimes and sometimes not. The timeline wanted to fetch the id for our dynamic block everytime, even if there was no content inside the block. I have now removed the if-statement around the div

{if or( $block.valid_nodes|count(), 
    and( is_set( $block.custom_attributes), $block.custom_attributes|count() ), 
    and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' )|not ) )}
    <div id="address-{$block.zone_id}-{$block.id}">
    {block_view_gui block=$block}
    </div>
{else}
    {skip}
{/if}

and I put the code in the template without any if-statements.

My question now is: Can there be any unwanted consequences if we don't have the if-statement in the zone template? What is the idea of this if-statement?

Thanks in advance!

Anja Lundin, Novitell AB, Sweden

------------------------------------
Anja Lundin
Developer, Novitell AB
Sweden

www.novitell.se

eZ debug

Timing: Jan 18 2025 02:01:15
Script start
Timing: Jan 18 2025 02:01:15
Module start 'content'
Timing: Jan 18 2025 02:01:15
Module end 'content'
Timing: Jan 18 2025 02:01:15
Script end

Main resources:

Total runtime0.2943 sec
Peak memory usage4,096.0000 KB
Database Queries185

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 587.7344180.7891
Module start 'content' 0.00750.1141 768.5234478.5625
Module end 'content' 0.12160.1726 1,247.0859333.0625
Script end 0.2943  1,580.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00411.3908210.0002
Check MTime0.00170.5820210.0001
Mysql Total
Database connection0.00080.264310.0008
Mysqli_queries0.226777.01511850.0012
Looping result0.00220.73681830.0000
Template Total0.265390.120.1326
Template load0.00230.785220.0012
Template processing0.262889.306420.1314
Template load and register function0.00010.031910.0001
states
state_id_array0.00090.293610.0009
state_identifier_array0.00100.323720.0005
Override
Cache load0.00150.5099170.0001
Sytem overhead
Fetch class attribute can translate value0.00130.431220.0006
Fetch class attribute name0.00080.281320.0004
XML
Image XML parsing0.00220.746220.0011
class_abstraction
Instantiating content class attribute0.00000.001820.0000
General
dbfile0.00501.6953270.0002
String conversion0.00000.002130.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs