duplicated nodes in result

Author Message

Albert Berenguer

Thursday 15 January 2004 11:23:58 am

hi all,
i've got the following code to fetch and sort some nodes in a folder:

{let children=fetch('content','list',
hash(parent_node_id, $node.node_id,
sort_by, array(array('attribute',false(),647))))}

the problem is that in the result every node appears twice, i mean it is duplicated. How can I solve this, so every node only appears once in the resulting array?

thanks in advance
Berto

Paul Borgermans

Thursday 15 January 2004 11:46:12 am

Related to?

http://ez.no/developer/ez_publish_3/bug_reports/fetching_children_with_attribute_filter_ignores_translations

or

http://ez.no/developer/ez_publish_3/bug_reports/sort_by_attribute_translation_duplicates_bug_incl_quickfix

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Albert Berenguer

Friday 16 January 2004 8:19:15 am

thanks!
I used both bugfixes and it worked!
thanks again!

Berto

Albert Berenguer

Friday 16 January 2004 10:47:12 am

Hi again,
I have another question now: is it possible to sort by an attribute but using its name (the indentifier, in class definition) instead of its number?
I have some classes with a field with the same name and I wanted to list them separately but using the same template. If I use the code above I will have to make different templates and change the attribute number in each one.

Hope I explained fine :)
Thanks in advance

-Berto-

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 31 2025 01:31:49
Script start
Timing: Jan 31 2025 01:31:49
Module start 'layout'
Timing: Jan 31 2025 01:31:49
Module start 'content'
Timing: Jan 31 2025 01:31:49
Module end 'content'
Timing: Jan 31 2025 01:31:49
Script end

Main resources:

Total runtime0.0216 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.1328151.2109
Module start 'layout' 0.00530.0034 739.3438220.6875
Module start 'content' 0.00870.0112 960.0313997.7891
Module end 'content' 0.01990.0017 1,957.820333.9922
Script end 0.0215  1,991.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002813.0480140.0002
Check MTime0.00125.6004140.0001
Mysql Total
Database connection0.00104.688410.0010
Mysqli_queries0.00209.060630.0007
Looping result0.00000.046410.0000
Template Total0.00135.810.0013
Template load0.00104.414210.0010
Template processing0.00031.409510.0003
Override
Cache load0.00073.055610.0007
General
dbfile0.00031.196180.0000
String conversion0.00000.027640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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