JavaScript error in toolbar.js when using paragraphs_edit frontend editing

Created on 16 July 2025, 16 days ago

Problem/Motivation

When using frontend editing, and the toolbar isOriented, the toolbar.js can throw an error because the admin toolbar is not available in the iframe.

Steps to reproduce

  1. Install the paragraphs module
  2. Install the paragraphs edit module
  3. Create an article with a bunch of paragraphs
  4. Change the orientation of the admin toolbar
  5. Edit on of the paragraphs from the frontend using a modal
  6. Observe the JS error

Proposed resolution

Properly check if the admin toolbar element exists before trying to set a class

Remaining tasks

  1. Create a MR
  2. Review
  3. Merge

User interface changes

None

Introduced terminology

None

API changes

None

Data model changes

None

Release notes snippet

None

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

toolbar.module

Created by

πŸ‡³πŸ‡±Netherlands seanB Netherlands

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

Comments & Activities

Production build 0.71.5 2024