IBX-10289: Fixed image picker when Image type has no 'tags' field#1821
Open
IBX-10289: Fixed image picker when Image type has no 'tags' field#1821
Conversation
…e has no matching field definition
16b1152 to
5a9bee7
Compare
5a9bee7 to
0282d85
Compare
|
alongosz
reviewed
Feb 11, 2026
| ]; | ||
|
|
||
| // The content type may not have the default fields; in that case, don't add the aggregations | ||
| $imageType = $this->contentTypeService->loadContentType(self::IMAGE_TYPE_ID); |
Member
There was a problem hiding this comment.
Please do not hardcode database IDs. There's no guarantee on a real instance, that a given ID will reference what you need it to reference.
-
Add to
ibexa.dam_widget.image.mappings.imageDI parametercontentTypeIdentifier: imagekey-value and use it as$this->config['image']['contentTypeIdentifier']. -
Load the content type using
loadContentTypeByIdentifierinstead. -
Make sure to handle
NotFoundExceptionas there's no guarantee an instance has image content type defined (or defined using that identifier). In such case an error should be logged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description:
Stop image aggregations from being added when the Image content type has no required field.