Skip to content

[Bug]: Grid relation filter crashes on Image/Asset fields - store undefined #1082

@Navino16

Description

@Navino16

Pimcore version

11.5.14.1 / admin-ui-classic-bundle 1.7.16 (verified also on 12.x / admin-ui-classic-bundle 2.x)

Steps to reproduce

  1. Create a DataObject class with an Image field (or other asset relation that doesn't use a store)
  2. Create objects with images
  3. Open the object grid view
  4. Try to use the relation filter on the Image column

Actual Behavior

JavaScript error: Cannot read properties of undefined (reading 'loadData')

The grid column config code assumes all relation editors have a store property, but Image/Asset fields don't always initialize one.

Expected Behavior

The code should check if editor.store exists before calling loadData().

Affected file: public/js/pimcore/element/helpers/gridColumnConfig.js (around lines 430 and 464)

Suggested fix:

// Change from:
editor.store.loadData(items, false);

// To:
if (editor.store) {
    editor.store.loadData(items, false);
}

Related: This issue often occurs together with the type error in pimcore/pimcore - Image.php (pimcore/pimcore#18939)

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