Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-10377

Inconsistent attribute data

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 3.10.0alpha1, 3.9.2
    • 3.9.1, 3.9.1rc1
    • Misc
    • 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.

      Attachments

        Activity

          People

            cyberwolf cyberwolf
            cyberwolf cyberwolf
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: