Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-72510

Validation check for concurrent updates for Web Content fails after multiple attempts


    • Fix Priority:


      The main mechanism in place preventing concurrent (overwriting) updates for the same Web Content is a version number comparison in JournalArticleLocalServiceImpl, which throws an Exception if two users try to publish conflicting updates to the same version. However, the Exception being thrown updates the version of the locally stored Web Content but does not refresh the form, so simply clicking the button again will publish the changes and overwrite the other changes.

      Steps to reproduce:

      1. Create a new user
      2. Add the user to the Liferay site, and give it the Administrator site role
      3. From Content administration, add a piece of Web Content and publish it
      4. On a separate browser, log in as the new user
      5. Use both browsers to have both users click "Edit" on the Web Content article to edit it at the same time
      6. Have one user make a change and publish the article
      7. Have the second user (who cannot see the published changes yet) make a different change, and attempt to publish the article
        Expected result: the publish fails and an error message is shown, instructing the user to re-apply changes and try again. The up-to-date, current version of the Web Content is displayed.
        Actual result: the publish fails and the error message is shown, but the up-to-date version of the Web Content is not displayed, and attempting to publish again will overwrite the other user's changes

      Reproduced in master: 594ad006e84a6f19de0a750dba2142f2871ae9d2
      Reproduced in ee-7.0.x: ad601082f5700519597180caf94708619ecb17a3


          Issue Links



              support-lep@liferay.com SE Support
              alec.shay Alec Shay
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              0 Vote for this issue
              1 Start watching this issue


                Days since last comment:
                3 years, 10 weeks, 3 days ago


                  Version Package