Skip to content

Select/Multiselect fields with Options Provider show raw values instead of labels in Studio UI #3322

@Maxara

Description

@Maxara

When editing a data object in Studio UI, Select and Multiselect fields that use an Options Provider (class-based or select_options mode) only display the raw stored value/ID instead of the resolved label.

For example, a select field with Options Provider returns options like [{key: "Category A", value: "1"}, {key: "Category B", value: "2"}]. When value 1 is stored, Classic UI shows "Category A" but Studio UI shows "1".

Expected behavior:
The field should display the resolved label from the Options Provider, same as in Classic UI.

Actual behavior:
Only the raw stored value is shown. The dropdown options are also empty since the Options Provider is not queried.

Root cause analysis:

The backend infrastructure is complete:

  • POST /pimcore-studio/api/data-objects/select-options endpoint exists (SelectOptionsController + SelectOptionsService)
  • It correctly resolves Options Provider labels using OptionsProviderResolverInterface

The frontend has the generated API slice but doesn't use it:

  • dataObjectGetSelectOptions mutation exists in data-object-api-slice.gen.ts
  • DynamicTypeObjectDataAbstractSelect tries to resolve labels via i18n.t(option.key) translation, which doesn't work for dynamic Options Provider values
  • The useOptionsHook pattern exists in grid-cell/utils/select-options.tsx but is not used in the object edit form
  • The layout endpoint (/data-objects/{id}/layout) only provides static options from "configure" mode, not dynamically resolved ones

Affected components:

  • vendor/pimcore/studio-ui-bundle/assets/js/src/core/modules/element/dynamic-types/definitions/objects/data-related/types/abstract/dynamic-type-object-data-abstract-select.tsx
  • vendor/pimcore/studio-ui-bundle/assets/js/src/core/modules/element/dynamic-types/definitions/grid-cell/utils/select-options.tsx

Versions:

  • pimcore/studio-ui-bundle: 1.x-dev
  • pimcore/studio-backend-bundle: 0.15.17

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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