Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.4.1
-
None
-
Yes
Description
Steps to reproduce
- Install Ibexa DXP v4
- Create a new content type with one image asset field
- Add a new image under the media/images folder
- Create content using created CT
- Publish
- Edit ibexa.yaml and add under the site the following code:
content_view:
full:
editor_articles:
template: '@ibexadesign/full/image_assets.html.twig'
match:
Id\Content: 67 #use id from created content
- Create a template under /templates/themes/standard/full/image_assets.html.twig with the following code:
{% extends '@ibexadesign/pagelayout.html.twig' %} {% block content %} {% set image_variation = ibexa_image_alias(content.getField('field_643d1c1c07928'), content.versionInfo, 'medium') %} {{ dump(image_variation) }} {% endblock %}
- Go to created content in frontend
Result
The image_variation variable will be null
Expected
The object Ibexa\Contracts\Core\Variation\Values\ImageVariation should appear
Note
When analyzing this issue, I found the PR that is responsible for this issue: https://github.com/ibexa/core/pull/185, currently we have two tags with the same name:
tags: - { name: 'ibexa.media.images.variation.handler', identifier: 'alias' }
So currently one is always overwritten, in this case, Ibexa\Bundle\Core\Imagine\Variation\ImagineAwareAliasGenerator is always used when setting IBEXA_VARIATION_HANDLER_IDENTIFIER=alias.