Problem/Motivation

In issue #3225284: Gutenburg Editor not coming up in Group content type there was a fix committed where the getting of config was also changed to use the config factory. I guess to use a DI pattern, which is nice. The problem was, however, that the same name was passed to the config factory (which really needs the name gutenberg.settings) and that will not give us any allowed blocks under any circumstances.

So basically this change (I don't know how well this will link):

https://git.drupalcode.org/project/gutenberg/-/commit/8fce11c138db5d6a7f...

-      'allowedBlocks' => $config->get($node_type . '_allowed_blocks'),
+      'allowedBlocks' => $this->configFactory->get($node_type . '_allowed_blocks'),

MR with fix coming up.

Steps to reproduce

Edit any content type. Edit its allowed blocks. Expect it to change. It does not change.

Proposed resolution

Restore the actual expected behavior.

Remaining tasks

Review patch. Commit.

User interface changes

None.

API changes

None.

Data model changes

None.

Issue fork gutenberg-3305967

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

eiriksm created an issue. See original summary.

eiriksm’s picture

Status: Active » Needs review
eiriksm’s picture

Priority: Normal » Major

I will bump this to at least major, please feel free to re evaluate :)

deepalij’s picture

Applied merge request !35 from #2 on 9.5.x
Applied successfully.

Edited allowed blocks from the content type are getting updated on the node.

Steps followed:
1. Install and enable Gutenberg
2. Enable Gutenberg in any content type -> Uncheck/check the blocks from "Allowed Gutenberg Blocks" -> Save
3. Go to /node/add/page where module is enabled
4. Click on + icon and ensure the blocks

Before patch:
Unchecked blocks
before

Node:
node

After patch:
after

RTBC +1

szeidler’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for the issue + merge request. This indeed is a major bug introduced in the other issue and a straightforward fix.

  • szeidler committed 8aed230 on 8.x-2.x authored by eiriksm
    Issue #3305967 by eiriksm: Allowed blocks not passed to editor
    
szeidler’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.