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

Command icon 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

pvbergen created an issue. See original summary.

pvbergen’s picture

Status: Active » Needs review
pvbergen’s picture

Status: Needs review » Reviewed & tested by the community

  • pvbergen committed f16986d8 on 2.0.x
    Issue #3381307: Load blocks and webforms in correct language
    
pvbergen’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.