Forums / Developer / AdvancedObjectRelationList, how to do without ?

AdvancedObjectRelationList, how to do without ?

Author Message

Sébastien Morel

Tuesday 11 December 2007 3:59:50 am

Hi,

On several site, I use the configuration

[BackwardCompatibilitySettings]
AdvancedObjectRelationList=enabled

With this configuration I can define in a class an attribute "ObjectRelation". This attribute allows the user to create an object on the fly, directly linked to the attribute (the new object will not have a node assigment)

My question is : How to do reproduce this feature without this configuration, and moreover, is the configuration bad or depreacated ?

When I read this http://ez.no/doc/ez_publish/technical_manual/3_10/reference/datatypes/object_relations#comment15485

I don't know what to think about the configuration...

Thanks for your explanation ;)

Séb

--
eZ c'est plus fort que toi !
http://www.ez-france.org
http://blog.plopix.net
@Novactive (http://www.novactive.com)

Sebastiaan van der Vliet

Thursday 13 December 2007 7:06:59 am

Hi Sébastien,

Have a look at the objectrelationbrowse datatype:
http://ez.no/developer/contribs/datatypes/ezobjectrelationbrowse_datatype

Kind regards,
Sebastiaan

Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.

Sébastien Morel

Friday 14 December 2007 4:13:03 am

Hi,

It's exactly that I meant.

Testing this extension I found a strange behavior, When I create a new object (an embedded object, at the first publishing, in the relation list there is two relation...

There is an example:
I have configure the atttribute (in the class article) with the default browse methode and permit the "create new object", and the new object will not be placed in the content tree.

The creation and the edition works fine, but the first time when I add a new object in the attribute, the list of relation (when I see the list in the admin interface) I have :

Related objects [2] Class Relation type
dqsdqsdqs Society Attribute ( Test extension )
dqsdqsdqs Society Attribute ( Title )

When I re-edit the object (which have the attribute) and that I just publish (without change anything) the relation become :
Related objects [2] Class Relation type
dqsdqsdqs Society Attribute ( Test extension )

Is it a bug ?

Thanks for your explantation

--
eZ c'est plus fort que toi !
http://www.ez-france.org
http://blog.plopix.net
@Novactive (http://www.novactive.com)

Sébastien Morel

Monday 17 December 2007 5:21:07 am

Hi,

has someone tested this extension? Did you encountered this bug ?

Thanks for your help.

Séb

--
eZ c'est plus fort que toi !
http://www.ez-france.org
http://blog.plopix.net
@Novactive (http://www.novactive.com)

Sebastiaan van der Vliet

Wednesday 19 December 2007 12:25:17 am

Hi Sébastien,

Could you send the screenshots to info[ at ]contactivity[ dot ]com, so I can have a look at it?

Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.

Sébastien Morel

Saturday 22 December 2007 5:44:36 am

Hi,

Sebastiaan did you have the time to make researches ?

Thanks

--
eZ c'est plus fort que toi !
http://www.ez-france.org
http://blog.plopix.net
@Novactive (http://www.novactive.com)

Sébastien Morel

Thursday 28 May 2009 4:18:17 am

Hello,

I found a bug at line 1240 of datatype/ezobjectrelationbrowsetype.php

$object->addContentObjectRelation( $objectID, $ObjectVersion, $ContentObjectID, $contentClassAttributeID);

This line must be :

$object->addContentObjectRelation( $objectID, $ObjectVersion, $contentClassAttributeID,eZContentObject::RELATION_ATTRIBUTE);

according the declaration method in kernel/classes/ezcontentobject.php line 2565

function addContentObjectRelation( $toObjectID,
                                       $fromObjectVersion = false,
                                       $attributeID = 0,
                                       $relationType = eZContentObject::RELATION_COMMON )

Without this fix, the datatype works fine, but the relation and reverse relation list was wrong in the admin interface and moreover an bad record was present in ezcontentobject_link table.

Strangely, when you published the content a second time, the bug was self-fixed... (the ezcontentobject_link table was fixed by another way in the code)

++

--
eZ c'est plus fort que toi !
http://www.ez-france.org
http://blog.plopix.net
@Novactive (http://www.novactive.com)

eZ debug

Timing: Jan 17 2025 21:10:55
Script start
Timing: Jan 17 2025 21:10:55
Module start 'content'
Timing: Jan 17 2025 21:10:55
Module end 'content'
Timing: Jan 17 2025 21:10:55
Script end

Main resources:

Total runtime0.1220 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 597.2969180.8125
Module start 'content' 0.00660.0063 778.1094107.7031
Module end 'content' 0.01290.1091 885.8125534.8594
Script end 0.1220  1,420.6719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00362.9169200.0002
Check MTime0.00141.1162200.0001
Mysql Total
Database connection0.00090.713710.0009
Mysqli_queries0.082467.49961410.0006
Looping result0.00090.77841390.0000
Template Total0.108889.110.1088
Template load0.00080.677010.0008
Template processing0.107988.447510.1079
Override
Cache load0.00060.452510.0006
Sytem overhead
Fetch class attribute can translate value0.00070.572910.0007
XML
Image XML parsing0.00020.203210.0002
General
dbfile0.00262.0935200.0001
String conversion0.00000.004930.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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