Saying you have a menu item in multiple places in the tree, but there is a place where given menu item contains child items the module is always grabbing first element found in the tree.
This is not always true given the following scenario:
Main Menu:
- Item A
-- Item A1
-- Item A2
-- Item B3
- Item B
-- Item B1
-- Item B2
-- Item B3 (Linked to the actual item from branch B3)
--- Item B3.1
--- Item B3.2
--- Item B3.4
- Item C
-- Item C1
-- Item C2
-- Item B3 (Linked to the actual item from branch B3)
- Item D
-- Item D1
--Item D2
So, it will be needed to check if the items returned from the B3 as a contextual filters contains child items to provide the correct menu item with the right parent UUID.
If multiple items are returned in getMenuLinkFromTargetUrl
method we need to iterate on each of them and check which one contains child items to return the right parent Item.
Needs work
3.0
Code
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.