Load blocks and webforms in correct language

Created on 15 August 2023, about 1 year ago
Updated 13 September 2023, about 1 year ago

Problem/Motivation

Block and webform components/patterns are cached after first load within pagedesigner edit mode. The caching doesn't respect the language, which leads to unpredictable results on loading the patterns.

Steps to reproduce

- Create a webform in English and translate it to another language (e.g. label)
- Load pagedesigner on a page in English and then in the other language. The form will be shown in English on both languages.
- Resave the form
- Load pagedesigner in the other language and then in English. The form will be shown in the other languages on both pages.

Proposed resolution

Add langcode to cache id in the Block handler and Webform handler, caching the definition per language.

Remaining tasks

-
- Write tests

User interface changes

- None

API changes

- Blocks and forms will be loaded in the language the pattern endpoint is accessed.

Data model changes

- None

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇨🇭Switzerland pvbergen

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

Comments & Activities

Production build 0.71.5 2024