Forums / Setup & design / object relations and main node

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

eZ debug

Timing: Jan 20 2025 04:07:33
Script start
Timing: Jan 20 2025 04:07:33
Module start 'content'
Timing: Jan 20 2025 04:07:34
Module end 'content'
Timing: Jan 20 2025 04:07:34
Script end

Main resources:

Total runtime0.9819 sec
Peak memory usage4,096.0000 KB
Database Queries207

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0086 588.9688180.8359
Module start 'content' 0.00860.8779 769.8047663.2500
Module end 'content' 0.88650.0953 1,433.0547341.0938
Script end 0.9818  1,774.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.3878210.0002
Check MTime0.00150.1482210.0001
Mysql Total
Database connection0.00060.065210.0006
Mysqli_queries0.905292.19372070.0044
Looping result0.00150.15622050.0000
Template Total0.955497.320.4777
Template load0.00180.178420.0009
Template processing0.953697.120320.4768
Template load and register function0.00010.009910.0001
states
state_id_array0.00120.120110.0012
state_identifier_array0.00060.064120.0003
Override
Cache load0.00150.1525380.0000
Sytem overhead
Fetch class attribute can translate value0.00090.092250.0002
Fetch class attribute name0.00090.088390.0001
XML
Image XML parsing0.00190.190650.0004
class_abstraction
Instantiating content class attribute0.00000.0016110.0000
General
dbfile0.00540.5482410.0001
String conversion0.00000.000930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs