Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-22113

"This page is currently locked by ..." not shown a second time

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 14.10.20, 13.10.6, 15.5.4
    • WYSIWYG Editor
    • None
    • Windows 11 Pro, Firefox 125.0.2, Chrome 124.0.63
    • Unknown

    Description

      From my tests on , I can confirm the following behavior:
      1. Administrator user edits the page https://localserver/xwiki/bin/edit/Sandbox/TestPage1 (either through in-place editing or WYSIWYG editor), adding a modification, keeping the page editing open

      2. User B tries to edit the same page and sees the message that the pages is blocked in editing by another user.

      3. User B forces the editing session of the page, adds a modification, saves and closes their session

      4. Administrator user saves and closes the editing of the page on their side and it added both their modification and the one of User B.

      5. Administrator user edits the page again and has the editing session still open.

      Potential problems:
      6. User B tries again to edit the page, the message to force the editing session is not shown again, being given the option to edit the page directly, both editing sessions (of Administrator user and User B) are active

      Then, adding a third user in the scenario:
      7. While have the 2 editing sessions described above still open (the last editor opening an editing session being User B), User C tries to edit the same TestPage1 and sees the "This page is currently locked by Administrator" message, even if the last user that opened an editing session on the page is User B.

      Positive aspect: the saved modifications of all users from their simultaneous editing sessions are merged into one version.
      Negative aspect: not having the message shown each time a user tries to edit a page that is still open in edit mode by another user could cause confusion.

      The major Q here is, why is the "This page is currently locked by ..." not displayed a second time?

      Secondary Q: when adding a third user in the scenario of having 2 editing sessions opened at the same time, why did it show the first user to open an editing session and not the last one?

      Attachments

        Activity

          [XWIKI-22113] "This page is currently locked by ..." not shown a second time
          ibalan Iulia Balan added a comment -

          Tested with XWiki Jetty HSQLDB 15.10.11

          Both editing inline and with WYSIWYG, steps and results:

          • user A edits the page and keeps the page opened
          • user B edits the same page and gets the message

            Editing can be forced, but be aware of the warnings below.
            This page is currently locked by AdministratorAdministrator.

          • then if user B closes the page, but after some while tries again to open the same page, while the user A never closed his editing session, then indeed user B no longer receives the warning (that user A is still editing) -> so while A still edits the page, if B edits and closes, only the first time is warned
          • if the third user C tries the first time to open the page while A and B are still editing, then C first gets the warning that user B is editing the page
          • but if user C tries to edit the page the second time, while A and B are still editing, then starting with the second time user C no longer gets the warning
          ibalan Iulia Balan added a comment - Tested with  XWiki Jetty HSQLDB 15.10.11 Both editing inline and with WYSIWYG , steps and results: user A edits the page and keeps the page opened user B edits the same page and gets the message Editing can be forced, but be aware of the warnings below. This page is currently locked by AdministratorAdministrator. then if user B closes the page, but after some while tries again to open the same page, while the user A never closed his editing session, then indeed user B no longer receives the warning (that user A is still editing) -> so while A still edits the page, if B edits and closes, only the first time is warned if the third user C tries the first time to open the page while A and B are still editing, then C first gets the warning that user B is editing the page but if user C tries to edit the page the second time, while A and B are still editing, then starting with the second time user C no longer gets the warning
          surli Simon Urli added a comment -

          I might be wrong but I think the issue here is mostly related to the fact that the lock information is not refreshed when using inplace editing. AndreeaChirica can you confirm that in all the scenario you always used inplace editor, and never went to the wysiwyg editor or the wiki editor?
          I'm pretty sure that you'd have had a more expected behaviour by reproducing the steps but using the wiki editor at each steps.

          surli Simon Urli added a comment - I might be wrong but I think the issue here is mostly related to the fact that the lock information is not refreshed when using inplace editing. AndreeaChirica can you confirm that in all the scenario you always used inplace editor, and never went to the wysiwyg editor or the wiki editor? I'm pretty sure that you'd have had a more expected behaviour by reproducing the steps but using the wiki editor at each steps.
          lucaa Anca Luca added a comment -

          If I correctly understood the code here, it seems that this issue is related to this code https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-14.10.10/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/edit_macros.vm#L26 which has been added for fixing XWIKI-15228 in commit https://github.com/xwiki/xwiki-platform/commit/b2b6a1569bb1aca55565a322bf355a01111ccb27 . However, there is no indication in XWIKI-15228 that this side-effect was intentional, so it would be a regression...

          lucaa Anca Luca added a comment - If I correctly understood the code here, it seems that this issue is related to this code https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-14.10.10/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/edit_macros.vm#L26 which has been added for fixing XWIKI-15228 in commit https://github.com/xwiki/xwiki-platform/commit/b2b6a1569bb1aca55565a322bf355a01111ccb27 . However, there is no indication in XWIKI-15228 that this side-effect was intentional, so it would be a regression...
          AndreeaChirica Andreea Chirica added a comment - - edited

          I can also reproduce the issue on an older version of XWiki, 13.10.6.

          AndreeaChirica Andreea Chirica added a comment - - edited I can also reproduce the issue on an older version of XWiki, 13.10.6.

          People

            Unassigned Unassigned
            AndreeaChirica Andreea Chirica
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: