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

eznode_assignment does not always reflect of removal secondary locations

    Details

      Description

      Removing a subtree via shell script "ezsubtreeremove.php" or through the admin portal, leads to wrong entries in "eznode_assignment" table (since related entries are not removed.

      steps to reproduce
      • create 2 folders (folderA and folderB)
      • create an article in folderA
      • add a secondary of the article in folderB
      • run the following sql query
        SELECT * FROM eznode_assignment WHERE contentobject_id=<article-content-object-id>
      • remove folderB (either through the script or the admin GUI"
      • re-run the query
        • the entries will remain the same.

        Issue Links

          Activity

          Hide
          Joaquim Cavalleri (Inactive) added a comment - - edited

          The effects of this can be noted by the incoherent results returned by the 3 methods made available to fetch node assignments

          $object = eZContentObject::fetch($objectID, true);
          $object->assignedNodes( false );
          $version = $object->version( $versionNumber );
          $version->attribute( 'node_assignments' );
          eZNodeAssignment::fetchForObject( $objectID, $versionNumber );
          

          The only method that presents a correct result is $object->assignedNodes( false );, the other 2 still reference the removed location

          Show
          Joaquim Cavalleri (Inactive) added a comment - - edited The effects of this can be noted by the incoherent results returned by the 3 methods made available to fetch node assignments $object = eZContentObject::fetch($objectID, true); $object->assignedNodes( false ); $version = $object->version( $versionNumber ); $version->attribute( 'node_assignments' ); eZNodeAssignment::fetchForObject( $objectID, $versionNumber ); The only method that presents a correct result is $object->assignedNodes( false ); , the other 2 still reference the removed location
          Hide
          Patrick Allaert (Inactive) added a comment -
          Show
          Patrick Allaert (Inactive) added a comment - Pull request available at: https://github.com/ezsystems/ezpublish-legacy/pull/583
          Show
          Patrick Allaert (Inactive) added a comment - Fixed in: eZ Publish master (merge commit): https://github.com/ezsystems/ezpublish-legacy/commit/0bc71f697291859c05dd223ac32de9ba026edef8 eZ Publish master: https://github.com/ezsystems/ezpublish-legacy/commit/77c2c4d8f950730c47c75adb1b217c63f312e678
          Hide
          Joao Pingo (Inactive) added a comment -

          Tested on Master, ezp4.7 and 4.3 using tc-1531
          All tests passed ... QA Approved

          Show
          Joao Pingo (Inactive) added a comment - Tested on Master, ezp4.7 and 4.3 using tc-1531 All tests passed ... QA Approved
          Show
          Jérôme Vieilledent (Inactive) added a comment - Regression : https://jira.ez.no/browse/EZP-20636

            People

            • Assignee:
              Unassigned
              Reporter:
              Joaquim Cavalleri (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Time Spent - 5 hours, 20 minutes Remaining Estimate - 40 minutes
                40m
                Logged:
                Time Spent - 5 hours, 20 minutes Remaining Estimate - 40 minutes
                5h 20m