Forums / Developer / Is this a bug, a feature or have I done something wrong ?

Is this a bug, a feature or have I done something wrong ?

Author Message

Nick Woods

Wednesday 28 April 2004 4:54:14 am

Go to http://www.carrotland.co.uk/events/2002 and note the ordering of the 'other years' entries near the top of the page
Then go to http://www.carrotland.co.uk/events/2003 and do the same and then http://www.carrotland.co.uk/events/2004

In case you didnt spot it, the 2003 entry has the order of the years reversed when compared to all the others.

The puzzle is that the code that generates the 'year bar' is the same each time, and is done using a template which overrides full.tpl for the class which holds the year.

The data structure is this

Folder (standard folder class, named 'Events' in this case)
..... Year (custom class, one field with just the year in it, one per year
...........Event (custom class, one per event)

ie.g
Folder (Event)
....... Year (2002)
............ 2002 event 1
............ 2002 event 2
....... Year (2003)
............ 2003 event 1
............ 2003 event 2
....... Year (2004)
............ 2004 event 1
............ 2004 event 2

and so on

This is the code that generates the 'year bar', basically it reads all the sibling years of the one currently being displayed and lists them out. The current year isnmt made into a link but all the others are

{* get all the other years for this parent *}
{let other_years=fetch( content, list, hash( parent_node_id,  $node.parent.node_id,
			sort_by, $node.sort_array,
			class_filter_type, include,
			class_filter_array, array('year' ) )
) }
{* if there is another year show a selector *}
{section show=count($other_years)|gt(1)}
	<div class="event_year_link">Other years :&nbsp;
	{section name=Year loop=$other_years }
	    {section show=$Year:item.object.data_map.year.data_int|eq($node.object.data_map.year.data_int)}
			{attribute_view_gui attribute=$Year:item.object.data_map.year} {* no link on this year *}
	    {section-else}
			<a href={$Year:item.url_alias|ezroot}>{attribute_view_gui attribute=$Year:item.object.data_map.year}</a>&nbsp;
        {/section}
	{/section}
	</div>
{/section}
{/let}

Paul Forsyth

Wednesday 28 April 2004 5:23:25 am

Sounds like the folder object for 'http://www.carrotland.co.uk/events/2003' has a different sort order. Can you edit that object and compare the sort order with other year folder objects?

paul

--
http://www.visionwt.com

Nick Woods

Wednesday 28 April 2004 5:52:10 am

I have just had a look and you are correct, the sort orders are different. I checked it last night but I must have missed it (embarrased emoticon)

Thanks !

Paul Forsyth

Wednesday 28 April 2004 5:56:58 am

np :)

eZ debug

Timing: Jan 18 2025 16:10:23
Script start
Timing: Jan 18 2025 16:10:23
Module start 'content'
Timing: Jan 18 2025 16:10:24
Module end 'content'
Timing: Jan 18 2025 16:10:24
Script end

Main resources:

Total runtime0.8373 sec
Peak memory usage4,096.0000 KB
Database Queries197

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 589.0547180.8125
Module start 'content' 0.00720.7101 769.8672489.4219
Module end 'content' 0.71730.1200 1,259.2891333.4531
Script end 0.8372  1,592.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.5078210.0002
Check MTime0.00150.1793210.0001
Mysql Total
Database connection0.00100.114410.0010
Mysqli_queries0.774392.47041970.0039
Looping result0.00180.21721950.0000
Template Total0.813297.120.4066
Template load0.00200.236320.0010
Template processing0.811296.888220.4056
Template load and register function0.00010.014510.0001
states
state_id_array0.00060.071510.0006
state_identifier_array0.00050.062320.0003
Override
Cache load0.00170.1988350.0000
Sytem overhead
Fetch class attribute can translate value0.00100.120830.0003
Fetch class attribute name0.00150.180540.0004
XML
Image XML parsing0.00040.051530.0001
class_abstraction
Instantiating content class attribute0.00000.001240.0000
General
dbfile0.00240.2832210.0001
String conversion0.00000.000730.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/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: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs