Bug description
In a multi-site setup, the applied filter badge for a terms field on a collection listing renders the term title in the wrong language. The filter builder dropdown shows the term in the correct (currently filtered) site, but once the filter is applied, the badge label shows the term title from a different localization.
Example (sites: default = German, english, czech):
- The taxonomy term has the German title Hartlöten (default) and an English localization Filler material for brazing and soldering.
- I filter the German product listing by Categories contains Hartlöten.
- The entry list is correctly scoped to German (German entry titles are shown), and the filter returns the correct entries.
- But the applied filter badge reads: Categories: Filler material for brazing and soldering (the English title) instead of Categories: Hartlöten.
So the filter works correctly; only the badge label is shown in the wrong language.
How to reproduce
- Create a multi-site install (e.g. default/de, english/en).
- Create a taxonomy (e.g. categories) with localized term titles (different title + slug per site).
- Add a terms field for that taxonomy to a collection's blueprint.
- In the CP, open the collection listing and add a Fields filter: contains , choosing the term in one site.
- Apply the filter and look at the resulting filter badge.
Expected: the badge shows the term title in the same site the listing is scoped to (e.g. Hartlöten).
Actual: the badge shows the term title from another localization (e.g. the English title).
Environment
Statamic: 6.11.0 (behavior confirmed unchanged on master)
Multi-site: yes
Repro is independent of the storage driver (flat-file).
Installation
Fresh statamic/statamic site via CLI
Bug description
In a multi-site setup, the applied filter badge for a terms field on a collection listing renders the term title in the wrong language. The filter builder dropdown shows the term in the correct (currently filtered) site, but once the filter is applied, the badge label shows the term title from a different localization.
Example (sites: default = German, english, czech):
So the filter works correctly; only the badge label is shown in the wrong language.
How to reproduce
Expected: the badge shows the term title in the same site the listing is scoped to (e.g. Hartlöten).
Actual: the badge shows the term title from another localization (e.g. the English title).
Environment
Installation
Fresh statamic/statamic site via CLI