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

Draft is kept after editing and publishing user

    Details

      Description

      When an existing user is edited and published, the content draft is kept rather than deleted, which is what should happen. The result is that when you edit the user again, you are prompted to select the existing draft, or alternatively to create a new one, rather than to proceed directly to the content editing page.

      Steps to reproduce:

      1. Create a new user e.g. John Smith;
      2. Edit the user and publish;
      3. Go to the dashboard and verify that, even though the user content has been published, there is still a draft (see attached "ez_support_issue_6064_screenshot_1.png" screenshot);
      4. Edit the user a second time. You now are prompted to select the existing draft or to create a new one, instead of going directly to the content editing page (see attached "ez_support_issue_6064_screenshot_2.png" screenshot).

        Issue Links

          Activity

          Hide
          Yannick Roger (Inactive) added a comment - - edited

          What is happening:

          Show
          Yannick Roger (Inactive) added a comment - - edited What is happening: The user is updated in the proxy that checks if a content is a user in order to update it: https://github.com/ezsystems/PlatformUIBundle/blob/master/Controller/Rest/ContentController.php#L72 Before calling the user service a draft is created (that's the one that will be left out) The userservice->updateUser we should be able to specify the version to be update and it doesn't seem to be the case: https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/Core/Repository/UserService.php#L665 Since we don't do it, a new draft is created, updated and returned: https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/Core/Repository/UserService.php#L723
          Hide
          Yannick Roger (Inactive) added a comment - - edited

          PR (workaround approach): https://github.com/ezsystems/PlatformUIBundle/pull/823

          Edit: Use PR bellow.

          Show
          Yannick Roger (Inactive) added a comment - - edited PR (workaround approach) : https://github.com/ezsystems/PlatformUIBundle/pull/823 Edit: Use PR bellow.
          Show
          Yannick Roger (Inactive) added a comment - PR : https://github.com/ezsystems/PlatformUIBundle/pull/825
          Hide
          Paulo Nunes (Inactive) added a comment -

          PR verified by QA and seems to be ok
          I'll send this issue back to Dev so that the merge may proceed

          Being a customer issue, please send it back to QA after the merge.

          Show
          Paulo Nunes (Inactive) added a comment - PR verified by QA and seems to be ok I'll send this issue back to Dev so that the merge may proceed Being a customer issue, please send it back to QA after the merge.
          Show
          Yannick Roger (Inactive) added a comment - Fixed in 1.7, 1.8 and master: https://github.com/ezsystems/PlatformUIBundle/commit/9c2f27562c6fa0fd8f17113b2ca713397f9a3319
          Hide
          Paulo Nunes (Inactive) added a comment -

          QA Approved

          Show
          Paulo Nunes (Inactive) added a comment - QA Approved

            People

            • Assignee:
              Unassigned
              Reporter:
              Nuno Oliveira (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: