EzSelection.options id jumping 0 to 2, skipping 1, bug ???

Author Message

Tore Skobba

Friday 06 February 2004 8:21:22 am

Hi all

I am making overall statistics on my users, the statistics are grouped by various status in several EZSelection data types each user has. For instance total number of articles posted grouped by sex. My algorithm for doing this is basically.

Fetch the attribute (EZSelection)
Fetch the attribute options

Section loop for each attribute.option
Fetch tree_count for each option set for the users
Calcualte and print statistics
End section

This is working fine, except that there seems to be an HOLE between 0 and 2 in the users selections, 1 is always missing in the user attributes. Example: an EZSelection with options: Class of, options: 1999,2000,2001. Then attribute options are (fetched from the class):
0 -> 1999
1 -> 2000
2 -> 2001

HOWEVER, EZ selection in the users has!
0 -> 1999
2 -> 2000
3 -> 2001

Is this a bug or is it me

Cheers
Tore

UPDATE:

Searching the database "ezcontentclass_attribute.data_text5" I find:
<?xml version="1.0" encoding="UTF-8"?>
<ezselection>
<options>
<option id="0"
name="Male" />
<option id="2"
name="Female" />
</options>
</ezselection>

The jump from 0 to 2 is consistent in all EZSelections, Could someone please tell me if this is a bug or if it is there for a reason. Am I doing my statistics wrongly ?

Cheers
Tore

Bård Farstad

Friday 06 February 2004 10:22:13 am

Hi Tore,

this was a known bug in eZ publish 3.2. I belive it was fixed for 3.3. If you see this with 3.3 please file a bugreport and we wil fix it.

-bård

Documentation: http://ez.no/doc

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 19 2025 00:13:29
Script start
Timing: Jan 19 2025 00:13:29
Module start 'layout'
Timing: Jan 19 2025 00:13:29
Module start 'content'
Timing: Jan 19 2025 00:13:30
Module end 'content'
Timing: Jan 19 2025 00:13:30
Script end

Main resources:

Total runtime0.8506 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 588.1563152.6563
Module start 'layout' 0.00560.0032 740.812539.5078
Module start 'content' 0.00880.8399 780.3203532.3047
Module end 'content' 0.84870.0018 1,312.62508.0938
Script end 0.8505  1,320.7188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3842160.0002
Check MTime0.00140.1588160.0001
Mysql Total
Database connection0.00070.076910.0007
Mysqli_queries0.790592.9364540.0146
Looping result0.00060.0702520.0000
Template Total0.817096.020.4085
Template load0.00230.268820.0011
Template processing0.814795.778720.4073
Template load and register function0.00070.076810.0007
states
state_id_array0.00100.121910.0010
state_identifier_array0.00190.220020.0009
Override
Cache load0.00180.2073410.0000
Sytem overhead
Fetch class attribute can translate value0.00150.181420.0008
Fetch class attribute name0.00200.234030.0007
XML
Image XML parsing0.00230.275620.0012
class_abstraction
Instantiating content class attribute0.00000.001030.0000
General
dbfile0.00160.1832170.0001
String conversion0.00000.000840.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs