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
- Adjust the handlers to include language in cache id.
- 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
Issue fork pagedesigner-3381307
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
pvbergen commentedComment #4
pvbergen commentedComment #6
pvbergen commented