Skip to content

Studio: select options request fails for classification store key with options provider #577

Description

@aKugler

Affected Version

2026.3

Affected capability

Data Objects

Steps to reproduce

  1. Create a classification store key of type "select" and set "Options Provider Class or Service Name" to a service name (@...).
  2. Assign the key to a group of a classification store field (here: field attributes on class "Product", class ID 1).
  3. Open a Product object in Studio, add the group and expand the select dropdown.

my Environment

  • pimcore/pimcore, pimcore/studio-backend-bundle, pimcore/studio-ui-bundle: all v2026.3.0
  • Options provider registered as a Symfony service (@bow_fitting_type.optionsprovider), implements SelectOptionsProviderInterface, hasStaticOptions() returns true
    (- works with a field in a class)

Actual Behavior

The options are displayed and the provider is called with a correct context, but a follow-up request fails:

Pimcore\Bundle\StudioBackendBundle\Exception\Api\NotFoundException:
"Class with ID: 1 not found" at SelectOptionsService.php line 150

Class 1 exists (it is the Product class). The message is misleading.

Analysis

Context received by the provider (debug output):

ownerType = classificationstore
ownerName = attributes
keyId     = 6
groupId   = 2

The failing request sends the classification store key ID as the field name (fieldName=6). In SelectOptionsService::getFieldDefinition() this is resolved against the object's class via dotNotationParser:

try {
    $fieldDefinition = $this->dotNotationParser
        ->parse($object, $selectOptionsParameter->getFieldName())
        ->getFieldDefinition();
} catch (Exception) {
    throw new NotFoundException('class', $object->getClassId());
}

Logging the swallowed exception shows:

Pimcore\Bundle\StudioBackendBundle\Exception\ParseException:
Field definition "6" does not exist

So the key ID is treated as a class field name and cannot be found. The classification store case does not appear to be handled in this code path. This is my reading of the code, not confirmed by the maintainers.

The broad catch (Exception) replaces the real cause with a "Class with ID: ... not found" message that points in the wrong direction.

Expected Behavior

The options are loaded without an error. The documentation describes the options provider for classification store keys with their own context (ownerType, ownerName, groupId, keyId, keyDefinition).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Platform Version

    None yet

    Affected capability

    None yet

    Galaxy

    None yet

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions