Skip to content

[Improvement] Add logic for multiple field collection fields #320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: 2.x
Choose a base branch
from

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
@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

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

Successfully merging this pull request may close these issues.

2 participants