Included CSS is wrong for translated background images

Created on 8 October 2020, about 4 years ago
Updated 27 January 2023, almost 2 years ago

Problem/Motivation

When a background image is translated, it will always build the CSS using the original language of the entity instead of the currrent language of the site. This can break the background image, because the generated image hash can differ per language. The rendered container has the hash for the translation, but the CSS will be the one of the original language.

Steps to reproduce

In a multilingual site with languages EN and NL enabled, create a background image for the EN language (original language). Translate the background image for the NL version and change the preload background color.

Proposed resolution

Add the current language code to the url of the CSS to make the CSS generation language aware.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇧🇪Belgium cgoffin

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

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