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

Workflow Event/Approve not working correctly

    Details

      Description

      With the administrator user add an Event/approve workflow to be triggered with content/publish/before, then with another user add a few articles and you'll get the following error in the debug redirect

      Error: 	Mar 13 2013 12:41:52
       
      Internal transaction counter mismatch : 1. Should be zero.
      

      Steps

      Setup - Create editor user
       
      Log in as admin in admin
      Click "User accounts" in top menu
      Click "Editors" link
      Click "Create here" button
      Enter form data:
      First name: Editor_tc182
      Last name : Editor_tc182
      Username : Editor_tc182
      Password : Editor_tc182
      Confirm password : Editor_tc182
      Email: tc182@test.com
      Click "Send for publishing button"
       
      Setup - Create workflow
       
      Click "Setup" tab in top menu
      Click "Workflows" link on left menu
      Click "New Workflow Group" button
      Enter Data
      Name: Group Workflow tc_182
      Press "OK" button
      On "Workflow Groups", click on "Group Workflow tc_182"
      On Workflows group, press "New workflow" button
      Enter Data
      Name: Workflow tc_182
      On events combo box, choose "Event / Approve"
      Press "Add Event" button
      On "Users who approve content" press "Add users" button
      Click on " Administrator User" link
      Check the  user  Administrator User
      Press "OK" button on the bottom of the page
      Press "Triggers" link on left side menu
      For Module "Content", Function "Publish", Connection Type "Before" choose the workflow "tc_182" on Workflow combo box
      Press "Apply changes" button
      Logout
       
      Create 1 articles as Editor_tc182
       
      Enter Ez Publish as Editor_tc182
      Press "Content Structure" tab on top menu
      On "Sub Items" group, choose "article" from the combo box and press "Create here" button
      Create article1 with data:
      Title: Article1
      Intro: Intro for Article1
      Press "Send for Publishing button"
      

        Issue Links

          Activity

          Hide
          Paulo Nunes (Inactive) added a comment -
          Show
          Paulo Nunes (Inactive) added a comment - real fix on https://jira.ez.no/browse/EZP-21599
          Hide
          Joao Pingo (Inactive) added a comment -

          No QA Needed
          Will be tested in https://jira.ez.no/browse/EZP-21599

          Show
          Joao Pingo (Inactive) added a comment - No QA Needed Will be tested in https://jira.ez.no/browse/EZP-21599
          Show
          Bertrand Dunogier added a comment - Reverted from ezpublish-legacy/master: https://github.com/ezsystems/ezpublish-legacy/commit/d355026740f39039e44e909544464c1a1fead233 . See https://jira.ez.no/browse/EZP-21599 for the final fix.
          Show
          Jérôme Vieilledent (Inactive) added a comment - Much cleaner approach: https://github.com/ezsystems/ezpublish-legacy/pull/767
          Hide
          Paulo Nunes (Inactive) added a comment -

          Passed after re-testing
          QA Approved.

          Show
          Paulo Nunes (Inactive) added a comment - Passed after re-testing QA Approved.
          Show
          Jérôme Vieilledent (Inactive) added a comment - Fixed in master : https://github.com/ezsystems/ezpublish-legacy/commit/c2992a1675594ac2a7aa5aff97692d635781ae92
          Show
          Jérôme Vieilledent (Inactive) added a comment - https://github.com/ezsystems/ezpublish-legacy/pull/581
          Hide
          Jérôme Vieilledent (Inactive) added a comment -

          Note that this issue probably also occurs with asynchronous publishing.

          Show
          Jérôme Vieilledent (Inactive) added a comment - Note that this issue probably also occurs with asynchronous publishing.
          Hide
          Jérôme Vieilledent (Inactive) added a comment -

          This issue is a regression from EZP-19660.

          Full transaction stack :

          Level 0
          {
            Began at:
            /Users/lolautruche/workspace/ezsystems/ezpublish/kernel/content/ezcontentoperationcollection.php:112 eZDBInterface::begin
              ->???:??? eZContentOperationCollection::beginTransaction
              Level 1
              {    
                Began at:
                /Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/ezcollaborationitemgrouplink.php:99 eZDBInterface::begin
                  ->/Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/collaborationhandlers/ezapprove/ezapprovecollaborationhandler.php:186 eZCollaborationItemGroupLink::addItem
                And commited at:
                /Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/ezcollaborationitemgrouplink.php:103 eZDBInterface::commit
                  ->/Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/collaborationhandlers/ezapprove/ezapprovecollaborationhandler.php:186 eZCollaborationItemGroupLink::addItem
              }
              Level 1
              {    
                Began at:
                /Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/ezcollaborationitemgrouplink.php:99 eZDBInterface::begin
                  ->/Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/collaborationhandlers/ezapprove/ezapprovecollaborationhandler.php:186 eZCollaborationItemGroupLink::addItem
                And commited at:
                /Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/ezcollaborationitemgrouplink.php:103 eZDBInterface::commit
                  ->/Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/collaborationhandlers/ezapprove/ezapprovecollaborationhandler.php:186 eZCollaborationItemGroupLink::addItem
              }
              Level 1
              {    
                Began at:
                /Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/eztrigger.php:244 eZDBInterface::begin
                  ->/Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/eztrigger.php:222 eZTrigger::runWorkflow
                And commited at:
                /Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/eztrigger.php:298 eZDBInterface::commit
                  ->/Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/eztrigger.php:222 eZTrigger::runWorkflow
              }
          }
          

          This is due to the fact that the transaction is not commited if operation is halted (seems so)

          Show
          Jérôme Vieilledent (Inactive) added a comment - This issue is a regression from EZP-19660 . Full transaction stack : Level 0 { Began at: /Users/lolautruche/workspace/ezsystems/ezpublish/kernel/content/ezcontentoperationcollection.php:112 eZDBInterface::begin ->???:??? eZContentOperationCollection::beginTransaction Level 1 { Began at: /Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/ezcollaborationitemgrouplink.php:99 eZDBInterface::begin ->/Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/collaborationhandlers/ezapprove/ezapprovecollaborationhandler.php:186 eZCollaborationItemGroupLink::addItem And commited at: /Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/ezcollaborationitemgrouplink.php:103 eZDBInterface::commit ->/Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/collaborationhandlers/ezapprove/ezapprovecollaborationhandler.php:186 eZCollaborationItemGroupLink::addItem } Level 1 { Began at: /Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/ezcollaborationitemgrouplink.php:99 eZDBInterface::begin ->/Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/collaborationhandlers/ezapprove/ezapprovecollaborationhandler.php:186 eZCollaborationItemGroupLink::addItem And commited at: /Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/ezcollaborationitemgrouplink.php:103 eZDBInterface::commit ->/Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/collaborationhandlers/ezapprove/ezapprovecollaborationhandler.php:186 eZCollaborationItemGroupLink::addItem } Level 1 { Began at: /Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/eztrigger.php:244 eZDBInterface::begin ->/Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/eztrigger.php:222 eZTrigger::runWorkflow And commited at: /Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/eztrigger.php:298 eZDBInterface::commit ->/Users/lolautruche/workspace/ezsystems/ezpublish/kernel/classes/eztrigger.php:222 eZTrigger::runWorkflow } } This is due to the fact that the transaction is not commited if operation is halted (seems so)

            People

            • Assignee:
              Unassigned
              Reporter:
              Pedro Resende (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 - 1 day, 1 hour, 45 minutes
                1d 1h 45m