Skip to content

[Studio][Index-bundle] Saving an index with object brick or field collection columns fails: "key: This value should not be blank." / "className: This value should not be blank." #3280

Open

Description

@codingioanniskrikos
Q A
Bug report? yes
Feature request? no
CoreShop version 2026.x-dev (index-bundle) — the code is identical on the 5.1 branch
Pimcore version 2026.2 (Studio UI)
PHP version 8.3

In the Pimcore Studio index editor, an index that contains at least one column taken from an
object brick (object type objectbricks) or a field collection (fieldcollections) can no
longer be saved. Saving fails with one pair of validation errors per such column, even when
nothing was changed:

key: This value should not be blank.
className: This value should not be blank.

Indexes that only contain plain object columns save fine, which is probably why this has
gone unnoticed.

Steps to reproduce

  1. Open Studio → CoreShop → Indices, open any index.
  2. Add a column from an object brick, e.g. a checkbox field of a brick (or use an index that already has one).
  3. Click save.

Result: the errors above, one key + className pair per brick column (for field collection
columns only className). The index is not saved.

Cause

The backend validates a column's configuration per object type:
AbstractConfigurableIndexColumnElementType::addConfigurationFields() adds a configuration
sub form, and IndexColumnTypeObjectBrickType requires key and className
(IndexColumnTypeFieldCollectionType requires className).

The Studio plugin never sends that configuration. In
src/CoreShop/Bundle/IndexBundle/Resources/assets/pimcore-studio/src/modules/indexes/IndexManager.tsx,
buildSavePayload() destructures configuration out of every column and does not add it back
to cleanCol:

data.columns?.forEach(col => {
  const { id, getter, getterConfig, interpreter, interpreterConfig, configuration, ...rest } = col
  const cleanCol: any = { ...rest }

  if (getter) cleanCol.getter = getter
  if (getterConfig && Object.keys(getterConfig).length > 0) cleanCol.getterConfig = getterConfig
  if (interpreter) cleanCol.interpreter = interpreter 
  if (interpreterConfig && Object.keys(interpreterConfig).length > 0) cleanCol.interpreterConfig = interpreterConfig                                                                                                      

  columnsObj[col.objectKey] = cleanCol
})

So the submitted payload for a brick column has no configuration, the sub form receives 
nothing, and the NotBlank constraints on key and className fail. The stored row in
coreshop_index_column still has the configuration  it is just dropped on the way back.

Proposed fix

Keep the column configuration in the payload, same as getter and interpreter config:

if (interpreterConfig && Object.keys(interpreterConfig).length > 0) cleanCol.interpreterConfig = interpreterConfig                                                                                                        
if (configuration && Object.keys(configuration).length > 0) cleanCol.configuration = configuration

The file has not changed since 2026-05-26 and the bug is present on both 2026.x and 5.1.
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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions