Block/menu/views derivative labels are always shown in the first language they are view in after cache rebuild

Created on 9 March 2019, almost 6 years ago
Updated 1 August 2024, 5 months ago

Problem/Motivation

Very similar to the original post. Layout builder add custom blocks were not displaying the block types in the translated language.

Original Post

In Layout Builder, when you go to add a block to a section, and click "Create custom block", a list of links of the type of custom block content you want to add as a inline block appears. On a multilingual site, this list of links displays only in one language, which is language the site is using when it caches the derivate plugin definitions.

This is because of line 52 of docroot/core/modules/layout_builder/src/Plugin/Derivative/InlineBlockDeriver.php:
$this->derivatives[$id]['admin_label'] = $type->label();
Which sets the admin_label of the derivate plugin definition to a string instead of TranslatableMarkup.

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
Language systemΒ  β†’

Last updated about 15 hours ago

  • Maintained by
  • πŸ‡©πŸ‡ͺGermany @sun
Created by

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

  • Blocks-Layouts

    Blocks and Layouts Initiative. See the #2811175 Add layouts to Drupal issue.

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