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

Unlock cronjob doesn't handle well locked/unlocked from other state groups

    XMLWordPrintable

Details

    Description

      1) Create a new "Content object state group" and name it "go_001".
      2) Into "go_001", create two states: "locked" and "not_locked".
      3) Change the states in some of your content to "locked".
      4) Execute the cronjob

      php ezpublish/console ezpublish:legacy:script runcronjobs.php unlock
      Running script 'runcronjobs.php' in eZ Publish legacy context
      Using siteaccess for cronjob
      Running cronjob part 'unlock'
      Running cronjobs/unlock.php at: 17/08/2016 12:55 pm
      Fetching objects with status : "locked"
      Removing lock of eZ Mountains ... Success
      Removing lock of Mount Ventoux ... Success
      Removing lock of Mount Castor ... Success
      Done
      Completing cronjobs/unlock.php at: 17/08/2016 12:55 pm
      Elapsed time: 00:00:00

      The cronjob assumed my User defined Object State as the default locked state and tried to handle it. The query of the cronjob should make sure only the default group would be considered for locks or this limitation should be described in the User defined Object States documentation page

      UPDATE ezcobj_state_link
      SET contentobject_state_id = 1
      WHERE contentobject_id =contentObjectID
      AND ezcobj_state.group_id = 2   /*modified*/
      AND  contentobject_state_id = 2';

      Attachments

        Activity

          People

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