Skip to content

Filter label not translated when field is hidden via hideOnIndex with useEntityTranslation enabled #7512

@palgalik

Description

@palgalik

Describe the bug

When using the useEntityTranslation option, filter labels are not translated correctly if the corresponding field is hidden from the index page via hideOnIndex.

In this case, the translation key is not looked up under entities.<EntityFQCN>.properties.<propertyName> as expected, but instead falls back to <propertyName> — resulting in the raw key being displayed as the filter label.

To Reproduce

  1. Enable useEntityTranslation in your DashboardController
  2. Add a field and its corresponding filter to any CRUD controller
  3. Add the translation key as described in the documentation (entities.<EntityFQCN>.properties.<propertyName>)
  4. Open the filter dialog — the filter label is translated correctly ✅
  5. Hide the field from the index page using hideOnIndex
  6. Open the filter dialog again — the filter label is no longer translated ❌

Additional context

The issue likely originates here, where hidden fields appear to be filtered out before the proper translation token is generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions