Fix Gin toolbar toggle button

Created on 8 January 2023, almost 2 years ago
Updated 23 January 2023, almost 2 years ago

Actually I've never seen the toggle button anywhere before but the JS error in the console I get with the current RC1 of Gin + Gin Toolbar tells me that there should be a toggle. Which is currently raising the following error.

Uncaught TypeError: Cannot read properties of null (reading 'parentNode')
    at addButtonGin (VM492 frontend_editing.js:233:19)
    at Object.attach (VM492 frontend_editing.js:265:13)
    at VM469 drupal.js:24:24
    at Array.forEach (<anonymous>)
    at Drupal.attachBehaviors (VM469 drupal.js:21:34)
    at VM470 drupal.init.js:24:12
    at HTMLDocument.listener (VM470 drupal.init.js:14:7)

Steps to reproduce after running the following multi-liner, create a new paragraph type and add it to any content type, create a node with that paragraph and visit front-end. Check console, the above error happens.

mkdir my-drupal9-site && \
cd my-drupal9-site && \
ddev config --project-type=drupal9 --docroot=web --create-docroot && \
ddev start && \
ddev composer create "drupal/recommended-project:^9" -y && \
ddev composer require drush/drush drupal/gin:@rc drupal/gin_toolbar:@rc drupal/admin_toolbar drupal/frontend_editing:@rc && \
ddev drush -y site:install --account-name=admin --account-pass=admin && \
ddev drush -y theme:enable gin && \
ddev drush -y config:set system.theme admin gin && \
ddev drush -y en admin_toolbar_tools gin_toolbar frontend_editing && \
ddev drush cr && \
ddev drush uli
🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

leymannx Berlin

Live updates comments and jobs are added and updated live.
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