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

The order of left and right panels is undeterministic

    Details

    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Pull Request Status:
      Pull Request accepted
    • Similar issues:

      Description

      In some edge cases in XWiki 10.8.1, the orders of the panels can be randomly screwed up depending on the order in which UIExtensions are registered against the ComponentManager.

      The bug itself is quite hard to reproduce and is created in https://github.com/xwiki/xwiki-platform/blob/99a11fa708071b17fcf437e09230f07a7b50dad9/xwiki-platform-core/xwiki-platform-panels/xwiki-platform-panels-api/src/main/java/org/xwiki/panels/internal/AbstractPanelsUIExtensionManager.java#L94

      Here is a use case which, given a list of 3 panels references ordered p1, p2, p3 in the context configuration, returns a list of panels in the wrong order :

      • In the for loop here, the UIExtension corresponding to the panel p3 gets picked up first. The panels list is empty, so it size is 0. The position of the panel thus get set to 0 here.
      • Then, the UIExtension corresponding to the panel p1 gets picked up. It gets assigned the position 1.
      • Finally, the UIExtension corresponding to the panel p2 gets picked up and gets assigned the position 2.

      In the end, with a configuration of panels p1, p2, p3, we get a final list of panels to display of p3, p1, p2.

      Marking this issue as a blocker as we used to support panels ordering and this is a regression.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                atallahade Adel Atallah
                Reporter:
                caubin Clément Aubin
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: