Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-5541

ibexa_image_alias with image asset field not working

    XMLWordPrintable

Details

    • Yes

    Description

      Steps to reproduce

      1. Install Ibexa DXP v4
      2. Create a new content type with one image asset field
      3. Add a new image under the media/images folder
      4. Create content using created CT
      5. Publish
      6. 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 
      1. 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 %} 
      1. 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.

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              mateusz.debinski@ibexa.co Mateusz Dębiński
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: