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 :)

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 18 2025 19:22:56
Script start
Timing: Jan 18 2025 19:22:56
Module start 'layout'
Timing: Jan 18 2025 19:22:56
Module start 'content'
Timing: Jan 18 2025 19:22:57
Module end 'content'
Timing: Jan 18 2025 19:22:57
Script end

Main resources:

Total runtime0.7269 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 589.2734152.6563
Module start 'layout' 0.00540.0031 741.929739.4922
Module start 'content' 0.00850.7168 781.4219484.3125
Module end 'content' 0.72530.0016 1,265.734412.1094
Script end 0.7269  1,277.8438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.5808160.0003
Check MTime0.00220.3037160.0001
Mysql Total
Database connection0.00070.099310.0007
Mysqli_queries0.673492.6419600.0112
Looping result0.00070.0974580.0000
Template Total0.695795.720.3479
Template load0.00310.421520.0015
Template processing0.692695.286920.3463
Template load and register function0.00020.031110.0002
states
state_id_array0.00140.186010.0014
state_identifier_array0.00080.115220.0004
Override
Cache load0.00260.3577350.0001
Sytem overhead
Fetch class attribute can translate value0.00060.076220.0003
Fetch class attribute name0.00110.152240.0003
XML
Image XML parsing0.00030.043120.0002
class_abstraction
Instantiating content class attribute0.00000.001440.0000
General
dbfile0.00060.0849100.0001
String conversion0.00000.001040.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
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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs