Skip to content

Listing filter badge shows taxonomy term title in the wrong site/language (multi-site) #14884

Description

@kikopfstand

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

  1. Create a multi-site install (e.g. default/de, english/en).
  2. Create a taxonomy (e.g. categories) with localized term titles (different title + slug per site).
  3. Add a terms field for that taxonomy to a collection's blueprint.
  4. In the CP, open the collection listing and add a Fields filter: contains , choosing the term in one site.
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions