Skip to content

[6.x] Fix nav entry links across sites losing their domain - #15239

Merged
jasonvarga merged 3 commits into
statamic:6.xfrom
lazerg:fix/issue-15237-nav-cross-site-entry-url
Aug 21, 2026
Merged

[6.x] Fix nav entry links across sites losing their domain#15239
jasonvarga merged 3 commits into
statamic:6.xfrom
lazerg:fix/issue-15237-nav-cross-site-entry-url

Conversation

@lazerg

Copy link
Copy Markdown
Contributor

On a multi-site install with sites on different domains, a nav item linking to an entry on another site rendered {{ url }} without that entry's scheme and host, so the browser resolved it against the current site and 404'd. Page::url() always fell back to the linked entry's relative URL, even when the nav had select_across_sites turned on, so only {{ permalink }} picked up the right domain. The same relative URL fed is_current and is_parent, so a cross-site item could get flagged as active whenever the two sites happened to share a path.

Page::url() and urlWithoutRedirect() now check the nav's select_across_sites setting and return the entry's absolute URL when it's enabled, mirroring the fix already applied to Bard entry links in #12694. AugmentedPage needed its own url()/urlWithoutRedirect() overrides too, since the augmented url key was resolving straight off the underlying entry instead of going through the page.

Fixes#15237

@jasonvarga
jasonvarga merged commit 53c6328 into statamic:6.xAug 21, 2026
61 checks passed
Sign up for freeto 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.

Nav entry links across sites lose their domain despite select_across_sites

2 participants

@lazerg@jasonvarga