Menu item dependencies (dependsOnModule, dependsOnConfig) are broken #9720
Labels
bug report
Fixed in 2.2.x
The issue has been fixed in 2.2 release line
Fixed in 2.3.x
The issue has been fixed in 2.3 release line
Issue: Clear Description
Gate 2 Passed. Manual verification of the issue description passed
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Issue: Format is valid
Gate 1 Passed. Automatic verification of issue format passed
Reproduced on 2.2.x
The issue has been reproduced on latest 2.2 release
Preconditions
menu.xml
adds menu items with dependency toSteps to reproduce
Expected result
The menu items are not visible.
Actual result
The menu items are visible.
Additional information
The menu item handling was refactored to read item data from two different sources:
The issue is that the initial reading from the uncached
menu.xml
node fails because the array keys used inpopulateFromArray
do not conform to the XSD. That in turn means that various attributes are never taken over to the transformed/cached menu entry and the dependency checks always return true.The corresponding unit test does not reveal this issue because it makes wrong/incomplete assumptions on the incoming data. So yes, the code in question is covered but not the scenario where menu item data comes in as-is from the
menu.xml
file.Another observation I made is that, although the same problem should apply to the
sortOrder
attribute, sorting actual works. That is because this attribute gets evaluated in another class where the originalmenu.xml
contents are available.Quick fix would probably be to align the array keys used during transformation with the attribute names in the XSD.
The text was updated successfully, but these errors were encountered: