Details
-
Bug
-
Resolution: Fixed
-
Medium
-
3.9.1, 3.9.1rc1
-
None
Description
While using the powercontent extension on a 3.9 site, I found a problem in the consistency of content object attribute data returned from eZContentObject::fetchDataMap, which finally leads to storing an incorrect object name.
In kernel/content/attribute_edit.php:
$object->storeInput( $contentObjectAttributes, $attributeInputMap );
will call the store method fo the object attributes, which will clear the global cache variable $eZContentObjectDataMapCache.
The function eZContentObject::fetchDataMap() however will fill the global variable $eZContentObjectDataMapCache again with data returned from eZContentObject::contentObjectAttributes(), which uses either a db query or the object member variable ContentObjectAttributes if it is set, and this variable wasn't unset when calling $object->storeInput.
A temporary solution I used was adding the following code at the bottom of eZContentObject::storeInput():
unset( $this->ContentObjectAttributes );
I insist on simplifying the way the attribute data is cached, both inside the object and the global variables. Currently it's very hard to track down any errors made.