Problem/Motivation

Umami demo on fresh install 8.9.7 and 9.0.7 got logs system events warning - The "extra_field_block:node:recipe:content_moderation_control" was not found.

Here's the output from my latest install:

 [notice] Performed install task: install_base_system
 [notice] Performed install task: install_bootstrap_full
 [notice] Performed install task: install_profile_modules
 [notice] Performed install task: install_profile_themes
 [notice] Performed install task: install_install_profile

No errors reported. Merge request created.

Steps to reproduce

Install Umami and check the logs or use drush.

There are other ways to get this though, without umami (see #39).

  • [warning] The "extra_field_block:node:page:content_moderation_control" block plugin was not found
  • [warning] The "extra_field_block:node:page:content_moderation_control" block plugin was not found
  • [warning] The "extra_field_block:node:article:content_moderation_control" block plugin was not found
  • [warning] The "extra_field_block:node:article:content_moderation_control" block plugin was not found
  • [warning] The "extra_field_block:node:recipe:content_moderation_control" block plugin was not found

Proposed resolution

Change all the node views to have the content moderation hidden.

Add test to prevent regression.

Remaining tasks

Review

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3176461

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

drupal.antonov created an issue. See original summary.

larowlan’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: -Umami +Bug Smash Initiative

Are you able to provide a stack-trace of what is causing this?

Thanks!

mglaman’s picture

😬no stacktrace, just a lowly +1

 You are about to:
 * DROP all tables in your 'db' database.

 // Do you want to continue?: yes.

 [notice] Starting Drupal installation. This takes a while.
 [notice] Performed install task: install_select_language
 [notice] Performed install task: install_select_profile
 [notice] Performed install task: install_load_profile
 [notice] Performed install task: install_verify_requirements
 [notice] Performed install task: install_write_profile
 [notice] Performed install task: install_verify_database_ready
 [notice] Performed install task: install_base_system
 [notice] Performed install task: install_bootstrap_full
 [notice] Performed install task: install_profile_modules
 [notice] Performed install task: install_profile_themes
 [warning] The "extra_field_block:node:recipe:content_moderation_control" was not found
 [warning] The "extra_field_block:node:recipe:content_moderation_control" was not found
 [notice] Performed install task: install_install_profile
 [notice] Translations imported: 9248 added, 0 updated, 0 removed.
 [notice] Performed install task: install_import_translations
 [notice] Performed install task: install_configure_form
 [notice] Performed install task: install_finish_translations
 [notice] Cron run completed.
 [notice] Performed install task: install_finished
 [success] Installation complete.
markconroy’s picture

Installing this on the 8.9.x branch. I am not having any issues with it. Here's my output:

$ drush si demo_umami -y --notify; drush -l http://umami.local/ uli; drush cr
You are about to DROP all tables in your 'umami' database. Do you want to continue? (y/n): y
Starting Drupal installation. This takes a while.                                                                   [ok]
Installation complete.  User name: admin  User password:                                                 [ok]
Congratulations, you installed Drupal!                                                                              [status]
http://umami.local/en/user/reset/1/1607636437/nqqeAYfksjdkj3Gpt2oJX_FxVX0RJ9-b5aaC_sjBWK03Xs/login
Cache rebuild complete. 

Version: 9.0.x-dev » 9.1.x-dev

Drupal 9.0.10 was released on December 3, 2020 and is the final full bugfix release for the Drupal 9.0.x series. Drupal 9.0.x will not receive any further development aside from security fixes. Sites should update to Drupal 9.1.0 to continue receiving regular bugfixes.

Drupal-9-only bug reports should be targeted for the 9.1.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.2.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

codemann’s picture

I'm having the same on Drupal 9.1.2 with Drush 10.3.6, on my local development with Lando :

$ lando drush site:install demo_umami --db-url=mysql://drupal9:drupal9@database:3306/drupal9 --account-name=admin --account-pass=admin --site-name=drupal9 --site-mail=drupal9@drupal9.com

 You are about to:
 * Create a sites/default/settings.php file
 * DROP all tables in your 'drupal9' database.

 Do you want to continue? (yes/no) [yes]:
 > yes

 [notice] Starting Drupal installation. This takes a while.
 [notice] Performed install task: install_select_language
 [notice] Performed install task: install_select_profile
 [notice] Performed install task: install_load_profile
 [notice] Performed install task: install_verify_requirements
 [notice] Performed install task: install_settings_form
 [notice] Performed install task: install_verify_database_ready
 [notice] Performed install task: install_base_system
 [notice] Performed install task: install_bootstrap_full
 [notice] Performed install task: install_profile_modules
 [notice] Performed install task: install_profile_themes
 [warning] The "extra_field_block:node:recipe:content_moderation_control" was not found
 [warning] The "extra_field_block:node:recipe:content_moderation_control" was not found
 [notice] Performed install task: install_install_profile
 [error]  Import of string "Cuando se visita <a href=@search_url>la página de búsqueda principal</a>, se mostrarán las páginas de búsqueda configuradas a las que se tiene acceso. Cada página de búsqueda muestra un formulario de búsqueda, y la página mostrará los resultados de la búsqueda tras incluir términos clave y presionar el botón de Buscar." was skipped because of disallowed or malformed HTML.
 [notice] Translations imported: 9075 added, 0 updated, 0 removed.
 [warning] 1 disallowed HTML string(s) in files: translations://drupal-9.1.2.es.po.
 [notice] Performed install task: install_import_translations
 [notice] Performed install task: install_configure_form
 [notice] Performed install task: install_finish_translations
 [notice] Cron run completed.
 [notice] Performed install task: install_finished
 [success] Installation complete.
pcate’s picture

I just ran into this error as well. Like @codemann I am using Lando with basically the same Drush command:

lando drush site:install demo_umami --db-url=mysql://drupal9:drupal9@database/drupal9 --account-pass=admin

Install was Drupal 9.1.9 and the terminal output was the same as @codemann's.

Not sure it will help to reproduce, but I'm using https://github.com/patrickcate/drupal-cleanroom to set things up.

Version: 9.1.x-dev » 9.3.x-dev

Drupal 9.1.10 (June 4, 2021) and Drupal 9.2.10 (November 24, 2021) were the last bugfix releases of those minor version series. Drupal 9 bug reports should be targeted for the 9.3.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

vito’s picture

Hi guys, I'm facing the same problem and I was able to fix some warnings of this type. In my case, I use the bootstrap layout builder module.
The Drupal installation tried to use the fields declared on each template on the "template library" list.
I found, on the config directory, the .yml file for each template, and inside each .yml you need to declare the dependency.
example

dependencies:
config:
- field.field.node.page.subtitle

Because the same file is requiring the field:

00000000-0000-0000-0000-000000000000:
uuid: 00000000-0000-0000-0000-000000000000
region: region_col_1
configuration:
id: 'field_block:node:page:subtitle'

Adding the dependency on the .yml file solve my problem.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

bernardm28’s picture

I'm getting this as well, with a custom content type. Is the weirdest type of error and 9.4 seem to get stuck on blt setup once it reached that warning. So I suppose, I will try to work around it somehow.

kristen pol’s picture

I just got this when installing demo_umami with ddev on 10.0.0-rc1.

I followed these instructions:

https://ddev.readthedocs.io/en/stable/users/quickstart/#drupal

except I did:

ddev drush site:install -y demo_umami

instead

ddev drush site:install -y

Kristens-MacBook-Pro:quantdrupal10 kristenpol$ ddev drush site:install -y demo_umami

 You are about to:
 * DROP all tables in your 'db' database.

 // Do you want to continue?: yes.                                                                                      

 [notice] Starting Drupal installation. This takes a while.
 [notice] Performed install task: install_select_language
 [notice] Performed install task: install_select_profile
 [notice] Performed install task: install_load_profile
 [notice] Performed install task: install_verify_requirements
 [notice] Performed install task: install_verify_database_ready
 [notice] Performed install task: install_base_system
 [notice] Performed install task: install_bootstrap_full
 [notice] Performed install task: install_profile_modules
 [notice] Performed install task: install_profile_themes
 [warning] The "extra_field_block:node:recipe:content_moderation_control" was not found
 [warning] The "extra_field_block:node:recipe:content_moderation_control" was not found
 [warning] The "extra_field_block:node:page:content_moderation_control" was not found
 [warning] The "extra_field_block:node:page:content_moderation_control" was not found
 [warning] The "extra_field_block:node:article:content_moderation_control" was not found
 [warning] The "extra_field_block:node:article:content_moderation_control" was not found
 [notice] Performed install task: install_install_profile
 [notice] Translations imported: 8836 added, 0 updated, 0 removed.
 [notice] Performed install task: install_import_translations
 [notice] Performed install task: install_configure_form
 [warning] No configuration objects have been updated.
 [notice] Performed install task: install_finish_translations
 [notice] Performed install task: install_finished
kristen pol’s picture

Please credit @dww for work on duplicate issue.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

kyletaylored’s picture

I'm running into this as well with Drupal 9.5.0

$ drush si demo_umami

 You are about to:
 * DROP all tables in your 'pantheon' database.

 Do you want to continue? (yes/no) [yes]:
 > yes

 [notice] Starting Drupal installation. This takes a while.
 [notice] Performed install task: install_select_language
 [notice] Performed install task: install_select_profile
 [notice] Performed install task: install_load_profile
 [notice] Performed install task: install_verify_requirements
 [notice] Performed install task: install_verify_database_ready
 [notice] Performed install task: install_base_system
 [notice] Performed install task: install_bootstrap_full
 [notice] Performed install task: install_profile_modules
 [notice] Performed install task: install_profile_themes
 [warning] The "extra_field_block:node:recipe:content_moderation_control" was not found
 [warning] The "extra_field_block:node:recipe:content_moderation_control" was not found
 [warning] The "extra_field_block:node:page:content_moderation_control" was not found
 [warning] The "extra_field_block:node:page:content_moderation_control" was not found
 [warning] The "extra_field_block:node:article:content_moderation_control" was not found
 [warning] The "extra_field_block:node:article:content_moderation_control" was not found
 [notice] Performed install task: install_install_profile
 [notice] Translations imported: 9293 added, 0 updated, 0 removed.
 [notice] Performed install task: install_import_translations
 [notice] Performed install task: install_configure_form
 [warning] No configuration objects have been updated.
 [notice] Performed install task: install_finish_translations
 [notice] Performed install task: install_finished
 [success] Installation complete.
tra.duong’s picture

I install demo_umami using:
Drupal 10.0.3
PHP 8.1.14
Drush 11.5.0
and run `lando drush si demo_umami -y`

[notice] Starting Drupal installation. This takes a while.
 [notice] Performed install task: install_select_language
 [notice] Performed install task: install_select_profile
 [notice] Performed install task: install_load_profile
 [notice] Performed install task: install_verify_requirements
 [notice] Performed install task: install_verify_database_ready
 [notice] Performed install task: install_base_system
 [notice] Performed install task: install_bootstrap_full
 [notice] Performed install task: install_profile_modules
 [notice] Performed install task: install_profile_themes
 [warning] The "extra_field_block:node:recipe:content_moderation_control" was not found
 [warning] The "extra_field_block:node:recipe:content_moderation_control" was not found
 [warning] The "extra_field_block:node:page:content_moderation_control" was not found
 [warning] The "extra_field_block:node:page:content_moderation_control" was not found
 [warning] The "extra_field_block:node:article:content_moderation_control" was not found
 [warning] The "extra_field_block:node:article:content_moderation_control" was not found
 [notice] Performed install task: install_install_profile
 [error]  Import of string "Las actualizaciones fallaron para el tipo de entidad %entity_type, para %entity_ids. <a href=:url>Compruebe los registros</a>." was skipped because of disallowed or malformed HTML. 
 [notice] Translations imported: 8892 added, 0 updated, 0 removed.
 [warning] 1 disallowed HTML string(s) in files: translations://drupal-10.0.3.es.po.
 [notice] Performed install task: install_import_translations
 [notice] Performed install task: install_configure_form
 [warning] No configuration objects have been updated.
 [notice] Performed install task: install_finish_translations
 [notice] Performed install task: install_finished

There are 8 warnings and 1 error

It is not good for a core's demo profile.

markconroy credited dww.

markconroy’s picture

Adding credit to @dww as per request from @Kristen Pol

tra.duong’s picture

I tried to trace and found something error:

 [notice] Performed install task: install_profile_themes
 [warning] The "extra_field_block:node:recipe:content_moderation_control" was not found
  .....
 [notice] Performed install task: install_install_profile

The orders is weid here, when install theme, it also try to import the settings in demo_umami/config/install
But the content types are installed in install_install_profile step.
After the content types is installed, the content_moderation module checks for moderated bundles to register the plugins (extra_field_block:node:{bundle}:content_moderation_control)

So, in the install_profile_themes step, it cannot see the (extra_field_block:node:{bundle}:content_moderation_control) then throw a 'PluginNotFoundException' and return as 'Drupal/Core/Block/Plugin/Block/Broken'.

Then, in install_install_profile step, it Fix that broken plugin, because content_moderation module invoke the register here.

Propose solution:
Considering about put the import content type's display mode in after content_moderation register the plugin / Or remove the warning of registering `extra_field_block:{content_type}:{bundle}:{content_moderation field}` plugins in the install_profile_themes step.

About the error when translation:
Line 30452 of "translations/drupal-10.0.3.es.po" in my case:


...
msgstr ""
"Las actualizaciones fallaron para el tipo de entidad %entity_type,
"para %entity_ids. <a href=\":url\">Compruebe los registros</a>."  
msgid ""
...

replace <a href=:url> to <a href=\":url\"> solve the error.

tra.duong’s picture

Status: Postponed (maintainer needs more info) » Active

I set the status to active. The trace in #20 should be the cause of the problem.

markconroy’s picture

Version: 9.5.x-dev » 10.1.x-dev
Issue summary: View changes
Status: Active » Needs review

I'm going to need someone with a better understanding of the config management system than me to check this, but it appears if we just remove the config for the offending sections, the profile installs fine, works as expected, and does not report any errors.

Here's the output from my latest install:

 [notice] Performed install task: install_base_system
 [notice] Performed install task: install_bootstrap_full
 [notice] Performed install task: install_profile_modules
 [notice] Performed install task: install_profile_themes
 [notice] Performed install task: install_install_profile

No errors reported. Merge request created.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative

Tested on an Umami install with the MR applied
The content types no longer have a moderation bar. So if my page is in draft I can't change moderation when viewing the page.

markconroy’s picture

@smustgrave that should not have happened. I hadn't noticed that when I created this patch. Thanks for testing.

cbovard’s picture

Subscribing

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

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

quietone’s picture

Title: The "extra_field_block:node:recipe:content_moderation_control" was not found » Umami install errors, "extra_field_block:node:*:content_moderation_control" was not found
Issue summary: View changes
Status: Needs work » Needs review

In my testing I found that when content moderation is enable and visible and layout builder is used on the view, then there are errors during the install. It seems to be while demo_umami_content is installing. This change avoids that problem and is not intended to fix the underlying problem. The goal here is to prevent the errors when install the demo profile.

I tested and was do not get the problem reported in #24 due to the fact that content_moderation_control is in the hidden section and not simply deleted.

Without this change there are still errors during install, see below, which are a result of #3043330: Reduce the number of field blocks created for entities (possibly to zero). Yet, the error here and that one are related so a single followup may be sufficient to fix the underlying problem.

 [warning] The "field_block:node:page:field_body" block plugin was not found
 [warning] The "extra_field_block:node:page:links" block plugin was not found
 
...

 [warning] The "field_block:node:recipe:field_ingredients" block plugin was not found
 [warning] The "field_block:node:recipe:field_recipe_instruction" block plugin was not found
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

If the content moderation block is meant to be hidden then this works.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

This is not the correct fix. We need to work out why this is happening. All these plugin IDs exist once umami is installed so everything works at that point. Also if you install atm you get far more warnings than just the moderation controls...

 [warning] The "field_block:node:page:body" was not found
 [warning] The "extra_field_block:node:page:links" was not found
 [warning] The "extra_field_block:node:page:content_moderation_control" was not found
 [warning] The "field_block:node:page:body" was not found
 [warning] The "extra_field_block:node:page:links" was not found
 [warning] The "extra_field_block:node:page:content_moderation_control" was not found
 [warning] The "field_block:node:article:field_tags" was not found
 [warning] The "field_block:node:article:field_media_image" was not found
 [warning] The "field_block:node:article:body" was not found
 [warning] The "extra_field_block:node:article:links" was not found
 [warning] The "extra_field_block:node:article:content_moderation_control" was not found
 [warning] The "field_block:node:article:field_tags" was not found
 [warning] The "field_block:node:article:field_media_image" was not found
 [warning] The "field_block:node:article:body" was not found
 [warning] The "extra_field_block:node:article:links" was not found
 [warning] The "extra_field_block:node:article:content_moderation_control" was not found
 [warning] The "field_block:node:recipe:field_tags" was not found
 [warning] The "field_block:node:recipe:field_recipe_category" was not found
 [warning] The "field_block:node:recipe:field_summary" was not found
 [warning] The "field_block:node:recipe:field_media_image" was not found
 [warning] The "field_block:node:recipe:field_difficulty" was not found
 [warning] The "field_block:node:recipe:field_number_of_servings" was not found
 [warning] The "field_block:node:recipe:field_cooking_time" was not found
 [warning] The "field_block:node:recipe:field_preparation_time" was not found
 [warning] The "field_block:node:recipe:field_media_image" was not found
 [warning] The "field_block:node:recipe:field_ingredients" was not found
 [warning] The "field_block:node:recipe:field_recipe_instruction" was not found
 [warning] The "extra_field_block:node:recipe:content_moderation_control" was not found
 [warning] The "field_block:node:recipe:field_tags" was not found
 [warning] The "field_block:node:recipe:field_recipe_category" was not found
 [warning] The "field_block:node:recipe:field_summary" was not found
 [warning] The "field_block:node:recipe:field_media_image" was not found
 [warning] The "field_block:node:recipe:field_difficulty" was not found
 [warning] The "field_block:node:recipe:field_number_of_servings" was not found
 [warning] The "field_block:node:recipe:field_cooking_time" was not found
 [warning] The "field_block:node:recipe:field_preparation_time" was not found
 [warning] The "field_block:node:recipe:field_media_image" was not found
 [warning] The "field_block:node:recipe:field_ingredients" was not found
 [warning] The "field_block:node:recipe:field_recipe_instruction" was not found
 [warning] The "extra_field_block:node:recipe:content_moderation_control" was not found

The interesting question is why are these plugins available after install and not at the point when the config from the profile is being installed.

alexpott’s picture

This problem is caused by an optimisation in \Drupal\layout_builder\Plugin\Derivative\FieldBlockDeriver::getFieldMap() that does not work when we are creating an entity view display as it relies on the entity view display already existing an having layout builder enabled. The same problem happens in \Drupal\layout_builder\Plugin\Derivative\ExtraFieldBlockDeriver::bundleIdsWithLayoutBuilderDisplays()

alexpott’s picture

This issue is really about creating an entity display with

third_party_settings:
  layout_builder:
    enabled: true

Being really really hard given the optimisations added in #3043330: Reduce the number of field blocks created for entities (possibly to zero). Somehow we need to make this work.

quietone’s picture

I agree this needs a correct fix. However I think it would be better to reduce the warnings someone gets when installing the demo then wait for that. As stated #29, "This change avoids that problem and is not intended to fix the underlying problem. The goal here is to prevent the errors when install the demo profile." And suggested creating a followup for the proper fix.

I do think the demo should not appear 'broken'.

alexpott’s picture

@quietone but the approach in the MR doesn't even fix half of the warnings.

alexpott’s picture

Status: Needs work » Needs review

I've created a branch that fixes all the warnings without removing any functionality. We need a way for extra field blocks to add dependencies when they are used. The content_moderation_control extra field block should add a dependency on workflows.workflow.editorial so we need to extend API to somehow take care of this and somehow add it in \Drupal\content_moderation\EntityTypeInfo::entityExtraFieldInfo() which will be very funky.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update

Seems to have some test failures.

Can the proposed solution be updated with the new approach

Thanks!

geek-merlin’s picture

Title: Umami install errors, "extra_field_block:node:*:content_moderation_control" was not found » Warning: "extra_field_block:node:*:content_moderation_control" was not found
Component: Umami demo » field system
Issue summary: View changes

I am finding this in dblog on a site with no trace of umami. I read alexpott's #37 as "not related to umami" too, so adjusting issue title.
Setting to "field system" for now.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.