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

eZWorkflowType::STATUS_REDIRECT sets bad object version status

    XMLWordPrintable

Details

    Description

      If you have a custom workflow event that returns eZWorkflowType::STATUS_REDIRECT, the status won't be correctly set and the items will disappear from admin interface because of that.

      Steps to Reproduce

      1. Create a custom workflow event according to the following code
        class myTest extends eZWorkflowEventType
        {
            const WORKFLOW_TYPE_STRING = 'mytest';
            function __construct(){
                parent::__construct(self::WORKFLOW_TYPE_STRING, 'My Test');
            }
        
            function execute( $process, $event ){
                $process->RedirectUrl = '/';
                return eZWorkflowType::STATUS_REDIRECT_REPEAT;
            }
        }
        
        eZWorkflowEventType::registerEventType( myTest::WORKFLOW_TYPE_STRING, 'myTest' );
        
      2. Create a new workflow and set it to before\publish trigger
      3. Create a new article
      4. The item won't be displayed at pending items

      Note: This was working in all versions before eZP 5.2

      Attachments

        Activity

          People

            Unassigned Unassigned
            eduardo.fernandes-obsolete@ez.no Eduardo Fernandes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 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 - 1 day, 1 hour, 30 minutes
                1d 1h 30m