file_url filter does not produce translated media

Created on 6 October 2021, about 3 years ago
Updated 24 July 2023, over 1 year ago

Problem/Motivation

If I want to get a path for a media entity in twig template, it will only produce default language version, not translated.

Steps to reproduce

in my template: {{ item['#paragraph'].field_media_image | file_url }}

Proposed resolution

add hasTranslation and getTranslation before getUrlFromEntity.

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States nikm

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024