Skip to content

Conversation

@lukmzig
Copy link
Contributor

@lukmzig lukmzig commented Apr 23, 2025

Changes in this pull request

Resolves issue when having multiple allowed field collection items in the class definition field. The field collection items can contain fields with same name which will result in overriding of the mapping.
The fields should be nested based on the field collection item names (type).

e.g
Error: "Handling "Pimcore\Bundle\GenericDataIndexBundle\Message\IndexUpdateQueueMessage" failed: handleIndexQueueEntry failed! Error: Bulk operation produced errors: {"took":0,"errors":true,"items":[{"index":{"_index":"pimcore_data-object_filterdefinition-odd","_id":"563","status":400,"error":{"type":"mapper_parsing_exception","reason":"failed to parse field [standard_fields.filters.preSelect] of type [text] in document with id '563'. Preview of field's value: '{document=[], asset=[], object=[]}'","caused_by":{"type":"illegal_state_exception","reason":"Can't get text on a START_OBJECT at 1:1110"}}}}]}" ["class" => "Pimcore\Bundle\GenericDataIndexBundle\Message\IndexUpdateQueueMessage","retryCount" => 3,"delay" => 4000,"error" => "Handling

preSelect get overriden by text field since its an input field in FilterInputField and in the FilterCategory it is a relation

@lukmzig lukmzig self-assigned this Apr 23, 2025
@sonarqubecloud
Copy link

@lukmzig lukmzig added this to the 2.0.0 milestone Apr 23, 2025
Copy link
Contributor

@markus-moser markus-moser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't test it but in general it LGTM

@robertSt7 robertSt7 modified the milestones: 2.0.0, 2.1.0 May 5, 2025
@fashxp
Copy link
Member

fashxp commented Jun 18, 2025

@lukmzig @markus-moser could we merge that before 2025.2 release?

@markus-moser
Copy link
Contributor

For me it's fine need to ask @lukmzig

@sonarqubecloud
Copy link

@lukmzig lukmzig merged commit 51d6fd9 into 2.x Jun 23, 2025
11 checks passed
@lukmzig lukmzig deleted the add-nesting-for-fieldcollections branch June 23, 2025 05:57
@github-actions github-actions bot locked and limited conversation to collaborators Jun 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants