Libraries are attached to entity's render array not to frontend_editing element

Created on 13 October 2023, about 1 year ago

Problem/Motivation

In case twig template doesn't print {{ content }} variable or the variable that corresponds to entity build render array, needed libraries are not attached even if {{ content.frontend_editing }} is printed.

Steps to reproduce

  1. Allow only block_content to be using frontend_editing.
  2. Create block and place it to some region.
  3. Create template for this block.
  4. Use {{ content.body }} variable in the template and {{ content.frontend_editing }}
  5. Observe that frontend_editing.js is not loaded.

Proposed resolution

Attach libraries to frontend_editing render element instead.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇩🇪Germany a.dmitriiev

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

Comments & Activities

Production build 0.71.5 2024