Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use parent localization when resolving link #7093

Merged

Conversation

arthurperton
Copy link
Contributor

@arthurperton arthurperton commented Nov 21, 2022

Fixes #3764 as suggested by @kesse.

I added fallback to the original entry, in case the localization does not exist.

@what-the-diff
Copy link

what-the-diff bot commented Nov 21, 2022

  • The Link fieldtype now passes the $localize parameter to ResolveRedirect::resolve()
  • When resolving a link, if it's an entry and we're localizing, then try to find that entry in the current locale first before falling back on default site language.

@arthurperton arthurperton marked this pull request as ready for review November 21, 2022 21:10
@jasonvarga jasonvarga merged commit 45cdf7b into statamic:3.3 Nov 29, 2022
@arthurperton arthurperton deleted the issue/issue-3764-link-field-multisite branch November 29, 2022 17:20
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.

Link field that links to an entry, links to the wrong site in a multisite setup
2 participants