Problem/Motivation

Hi, I struggled with installing a new site based on existing config with drush si --existing-config, it fails with the message:

"Missing bundle entity, entity type block_content_type, entity id reusable_block."

After chasing this a bit I found that it is because gutenberg_install() tries to save a configuration entity before the reusable_block block content bundle exists in active configuration.

Steps to reproduce

drush si --existing-config -vvv will give a verbose output, eventually pointing to the .install file. Doing an early return in gutenberg_install and run the drush command again and you will see that it works.

Proposed resolution

TBD, but som guardrails or if possible avoiding to work on entities that might not exist in gutenberg_install()

CommentFileSizeAuthor
#5 3604139-drush-installing-from.patch863 bytesdkmishra

Issue fork gutenberg-3604139

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

vegardjo created an issue. See original summary.

vegardjo’s picture

Issue summary: View changes

dkmishra made their first commit to this issue’s fork.

dkmishra’s picture

Status: Active » Needs review
StatusFileSize
new863 bytes

Patch attached

vegardjo’s picture

Status: Needs review » Reviewed & tested by the community

Thx! Patch looks good to me, and I can confirm that site now installs successfully from config when patched.

szeidler’s picture

I'm wondering if this would be a proper check for such situations?

if (\Drupal::isConfigSyncing()) {
  return;
}