Details
-
Bug
-
Resolution: Fixed
-
Major
-
4.3.1
-
Unknown
-
N/A
-
N/A
-
Pull Request accepted
-
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
- is related to
-
XWIKI-15601 Global Left/Right menus are not displayed in subwikis
- Closed