Skip to content

Conversation

@duncanmcclean
Copy link
Member

This PR fixes an issue with the is_parent variable where it is incorrectly returning true when the page URL is #.

It looks like it was caused by some of the URL-reworkings in #11840. URL::isAncestorOf() now strips the fragment and any query parameters from the URL (which in this case would leave an empty string) and passes it to URL::tidy() which returns / (the actual parent).

Fixes #13226

@duncanmcclean duncanmcclean linked an issue Dec 5, 2025 that may be closed by this pull request
@jasonvarga jasonvarga merged commit eeaa07b into master Dec 5, 2025
12 checks passed
@jasonvarga jasonvarga deleted the is-parent-fragment branch December 5, 2025 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[6.x] Nav {{ is_current || is_parent }} not working as expected

3 participants