Gutenberg editor fails to load with Group module - JavaScript destructuring error

Created on 10 July 2025, 28 days ago

When using the Gutenberg with the Group module, attempting to add or edit nodes through Group module routes (e.g., adding content to a group) results in a JavaScript error that prevents the Gutenberg editor from loading:

gutenberg.js:147 Uncaught (in promise) TypeError: Cannot destructure property 'contentType' of 'format.editorSettings' as it is null.
    at Object.attach (gutenberg.js:147:15)

Steps to Reproduce

  • Install and enable both Gutenberg and Group modules
  • Create a group
  • Configure a content type to use Gutenberg editor
  • Navigate to add content to the group (e.g., /group/1/content/add/group_node:article)
  • Observe the JavaScript error in browser console and Gutenberg editor fails to load

Root Cause

The GutenbergContentTypeManager::getGutenbergNodeTypeFromRoute() method correctly invokes the hook_gutenberg_node_type_route hook for custom routes, but no implementation exists for Group module routes (entity.group_relationship.create_form and entity.group_relationship.edit_form).

Proposed Solution

Implement the hook_gutenberg_node_type_route() hook to handle Group module routes, as documented in gutenberg.api.php.oup module compatibility.
Previously in the issue 3163200 📌 Make Gutenberg entity-type-agnostic Needs work

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024