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

eZContentObjectTrashNode originalParent() method fails when called multiple times

    Details

      Description

      eZContentObjectTrashNode originalParent() method fails when called multiple times


      *Steps to reproduce:*

      1. Send any object to trash, remember its object id.
      2. The following code piece shows the problem. Pay attention to the comments in code below :

      <?php
       
        // Replace with the actual trashed object id
        $contentObjectId = 100;
        // Fetch trash node
        $trashNode = eZContentObjectTrashNode::fetchByContentObjectID( $contentObjectId );
       
        // First call : works as intended, returns trash node original parent
        $originalParent = $trashNode->attribute( 'original_parent' );
        if ( $originalParent instanceof eZContentObjectTreeNode )
          echo 'First call : success';
       
        // Subsequent call : fails, returns null
        $originalParent = $trashNode->attribute( 'original_parent' );
        if ( $originalParent === null )
          echo 'Second call : failure';
      

        Activity

        Show
        Yannick Roger (Inactive) added a comment - Fixed in master: https://github.com/ezsystems/ezpublish-legacy/commit/86d625fec8e2136727f3d2ae65a11ee7f9df0b7f
        Hide
        Eduardo Fernandes (Inactive) added a comment -

        QA Tested and Approved

        Show
        Eduardo Fernandes (Inactive) added a comment - QA Tested and Approved

          People

          • Assignee:
            Unassigned
            Reporter:
            Ricardo Correia (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 10 minutes
              10m