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)

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 18 2025 00:03:56
Script start
Timing: Jan 18 2025 00:03:56
Module start 'layout'
Timing: Jan 18 2025 00:03:56
Module start 'content'
Timing: Jan 18 2025 00:03:57
Module end 'content'
Timing: Jan 18 2025 00:03:57
Script end

Main resources:

Total runtime1.1225 sec
Peak memory usage4,096.0000 KB
Database Queries69

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.0469152.6406
Module start 'layout' 0.00520.0030 740.687539.4766
Module start 'content' 0.00821.1128 780.1641606.4297
Module end 'content' 1.12100.0014 1,386.593820.1250
Script end 1.1224  1,406.7188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2773160.0002
Check MTime0.00130.1159160.0001
Mysql Total
Database connection0.00050.047810.0005
Mysqli_queries1.033192.0399690.0150
Looping result0.00660.5889670.0001
Template Total1.089097.020.5445
Template load0.00220.200420.0011
Template processing1.086896.816320.5434
Template load and register function0.00010.009710.0001
states
state_id_array0.00140.128210.0014
state_identifier_array0.00090.082420.0005
Override
Cache load0.00200.1810630.0000
Sytem overhead
Fetch class attribute can translate value0.00060.053520.0003
Fetch class attribute name0.00180.160490.0002
XML
Image XML parsing0.00310.273020.0015
class_abstraction
Instantiating content class attribute0.00000.0029140.0000
General
dbfile0.00310.2804230.0001
String conversion0.00000.000740.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
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 41
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs