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

eznode_assignment entries do not get removed

    XMLWordPrintable

Details

    Description

      in kernel/content/removeobject.php eZContentOperationCollection::removeAssignment() is called, passing in the object id of the parent (!!!) node of the object that we want to remove as $objectID. Inside the method, the assigned node list of the parent gets fetched

      $nodeAssignmentList   = eZNodeAssignment::fetchForObject( $objectID, ...
      

      and that array is further matched with the node that we want to remove. This is wrong. Instead of the assigned nodes of the parent object, the assigned nodes of the object in the node that we want to remove should be used. Currently, because of this wrong code the entries in the eznode_assignment table are not removed and are out of sync with the locations that are really there.

      This is a regression introduced in eZ Publish 4.1 with the addition of the new operations.

      Steps to reproduce

      publish an object at 2 locations
      write down the id of the object
      go to the parent node of the non-main location, check the checkbox in front of the object you created and click remove selected

      now check in the database:
      SELECT * FROM eznode_assignment e where contentobject_id=<id of the object>;

      there will still be 2 rows, while there should be only 1

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: