- Issue created by @muriqui
- Merge request !18Issue #3446513: Fix tokens in subtree links not being replaced. β (Open) created by muriqui
- Status changed to Needs review
9 months ago 1:53pm 10 May 2024
Tokens in subtree links are not replaced.
Expected result: The token is replaced in the child link's URL.
Actual result: The token is not replaced.
The problem is in \Drupal\menu_token\Service\MenuLinkTreeMenuToken::replaceLinkUrls. This method loops through the menu tree, but does not check each link's subtree value; thus, only top-level links are replaced. This can be solved by recursing through the subtree (if it is not empty).
Needs review
9.1
Code