Author Topic

Sébastien Morel

Thursday 28 May 2009 4:18:17 am

Comment48845

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)