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

RemoveField should not result in fatal errors due to problems with the ezcontentobject_attribute table rows


    • Type: Improvement Improvement
    • Status: Confirmed
    • Priority: High High
    • Resolution: Unresolved
    • Affects Version/s: 5.4.8
    • Fix Version/s: Customer request
    • Component/s: Legacy bridge
    • Labels:


      Let's say that, for some reason, we have data for a specific archived content object version in the ezcontentobject_version table but we do not have any data for that content object version in the ezcontentobject_attribute. Among other hyphotesis, I believe it's possible that this happens if there are problems with MySQL cluster synchronization.

      Now we must perform a change in our content types and remove some content attributes. When RemoveField will try to map the attributes for that specific version – since the attributes do not exist – it will result in a fatal error.


      public function apply($contentId)
        foreach ($versionNumbers as $versionNo) {
          $contentRows = $this->contentGateway->load($contentId, $versionNo);
          $contentList = $this->contentMapper->extractContentFromRows($contentRows, $nameRows);
          //Here is the fatal error, since there is no $contentList
          $content = $contentList[0];

      If this happens, RemoveField should not return errors. Instead, it should check if contentList is_set and, if not, ignore that version with just a warn.


        Eduardo Fernandes (Inactive) created issue -
        Eduardo Fernandes (Inactive) made changes -
        Field Original Value New Value
        Link This issue relates to CS-5777 [ CS-5777 ]
        Eduardo Fernandes (Inactive) made changes -
        Status Open [ 1 ] Confirmed [ 10037 ]
        Alex Schuster made changes -
        Workflow EZ* Development Workflow [ 101331 ] EZEE Development Workflow [ 108752 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Confirmed Confirmed
        3m 29s 1 eduardo.fernandes@ez.no 10/Nov/16 5:38 PM


          • Assignee:
            Eduardo Fernandes (Inactive)
          • Votes:
            0 Vote for this issue
            3 Start watching this issue


            • Created: