Forums / Setup & design / object relations and main node
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.
CheersBruce
My Blog: http://www.stuffandcontent.com/ Follow me on twitter: http://twitter.com/brucemorrison Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish
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?
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
Wednesday 29 August 2007 5:13:07 am
I've reported this as a bug:
http://issues.ez.no/IssueView.php?Id=11346
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