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

Source locale doesn't respect locale inheritance mode #842

Open
2 tasks done
mfendeksilverstripe opened this issue Apr 8, 2024 · 0 comments
Open
2 tasks done

Source locale doesn't respect locale inheritance mode #842

mfendeksilverstripe opened this issue Apr 8, 2024 · 0 comments

Comments

@mfendeksilverstripe
Copy link
Contributor

mfendeksilverstripe commented Apr 8, 2024

Module version(s) affected

7

Description

getSourceLocale() is supposed to give you the locale which the content is coming from for a specific model but it doesn't take into account locale inheritance mode which is a model level setting.

319797975-24c993d8-8ac2-4704-8a61-694797fa6d64

How to reproduce

Apply INHERITANCE_MODE_EXACT to a model (for example a campaign page). Let's assume this test setup:

  • English locale (global default)
  • German locale (falls back to English locale)
  • test page is localised only in English locale
  • check the source locale for this page in German locale

Expected source locale

null (no source)

Actual source locale

English locale

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)

PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant