object relations and main node

Author Message

Marko Žmak

Wednesday 22 August 2007 11:26:25 pm

I'm using object relations attribute in one of my classes, I've set the selection method to "List with checkboxes" and I've set the default location (let's call it "node A").
When I edit an object of this class, I get for this attribute a list consisting only of nodes that have this "node A" as a main node. Those that have the "node A" set as a additional location are not shown.

Is this a bug, or is normal eZ behaviour? Can this be configured some way?

I'm using eZ 3.9.2

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Bruce Morrison

Thursday 23 August 2007 7:11:24 pm

Hi Marko

It appears to be hard coded in the edit template (design/standard/templates/content/datatype/edit/ezobjectrelationlist.tpl)

From line 13:

 nodesList=cond( and( is_set( $class_content.class_constraint_list ), $class_content.class_constraint_list|count|ne( 0 ) ),
                         fetch( content, tree,
                                hash( parent_node_id, $parent_node,
                                      class_filter_type,'include',
                                      class_filter_array, $class_content.class_constraint_list,
                                      sort_by, array( 'name',true() ),
                                      main_node_only, true() ) ),

removing <b>main_node_only, true()</b> sould do the trick.

Not sure if this change effects anything else but the "List with checkboxes" option should be OK.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Marko Žmak

Thursday 23 August 2007 10:45:30 pm

Is this a bug or a bad feature in eZ?

Could this be changed in next eZ versions, or at least made configurable?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Xavier Dutoit

Friday 24 August 2007 1:45:24 am

Hi Marko,

It is configurable and you can override content/datatype/edit/ezobjectrelationlist.tpl with your own template.

As for the reason, I did it that way for the class selection (and of course, if you filter by class and not by location, you need to have only the main nodes to avoid to see twice the same content).

And as it shares the code with the by location selection...

I'd suggest to post a bug.

X+

http://www.sydesy.com

Marko Žmak

Wednesday 29 August 2007 5:13:07 am

I've reported this as a bug:

http://issues.ez.no/IssueView.php?Id=11346

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Norbert Wagner

Saturday 07 February 2009 9:10:43 am

The issue is now marked as Code Review and a comment states that it works since 3.9.4.

But I still have the same issue with 4.0.1, does that mean that the bugfix has still to be accepted, or do i miss something?

Norbert

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 06:08:44
Script start
Timing: Jan 19 2025 06:08:44
Module start 'layout'
Timing: Jan 19 2025 06:08:44
Module start 'content'
Timing: Jan 19 2025 06:08:45
Module end 'content'
Timing: Jan 19 2025 06:08:45
Script end

Main resources:

Total runtime1.5220 sec
Peak memory usage4,096.0000 KB
Database Queries70

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 589.1563152.6250
Module start 'layout' 0.00620.0035 741.781339.4609
Module start 'content' 0.00971.5109 781.2422658.1719
Module end 'content' 1.52060.0014 1,439.414116.1641
Script end 1.5220  1,455.5781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.1998160.0002
Check MTime0.00130.0846160.0001
Mysql Total
Database connection0.00130.084710.0013
Mysqli_queries1.453395.4885700.0208
Looping result0.00080.0530680.0000
Template Total1.486397.720.7432
Template load0.00170.112820.0009
Template processing1.484697.541720.7423
Template load and register function0.00010.008110.0001
states
state_id_array0.00140.094010.0014
state_identifier_array0.00190.122920.0009
Override
Cache load0.00150.0976380.0000
Sytem overhead
Fetch class attribute can translate value0.00080.054140.0002
Fetch class attribute name0.00110.072790.0001
XML
Image XML parsing0.00220.146240.0006
class_abstraction
Instantiating content class attribute0.00000.0014110.0000
General
dbfile0.00190.1238300.0001
String conversion0.00000.000640.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
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/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
8content/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: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs