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
| Comment | File | Size | Author |
|---|---|---|---|
| extra_field_block_2020-10-12 190703.png | 11.89 KB | drupal.antonov |
Issue fork drupal-3176461
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
Comment #2
larowlanAre you able to provide a stack-trace of what is causing this?
Thanks!
Comment #3
mglaman😬no stacktrace, just a lowly +1
Comment #4
markconroy commentedInstalling this on the 8.9.x branch. I am not having any issues with it. Here's my output:
Comment #6
codemannI'm having the same on Drupal 9.1.2 with Drush 10.3.6, on my local development with Lando :
Comment #7
pcate commentedI 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=adminInstall 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.
Comment #9
vito commentedHi 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.
Comment #11
bernardm28 commentedI'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.
Comment #12
kristen polI just got this when installing
demo_umamiwith ddev on10.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_umamiinstead
ddev drush site:install -yComment #13
kristen polSee #3304415: When installing Umami: [warning] The "extra_field_block:node:recipe:content_moderation_control" was not found
Comment #14
kristen polPlease credit @dww for work on duplicate issue.
Comment #16
kyletaylored commentedI'm running into this as well with Drupal 9.5.0
Comment #17
tra.duong commentedI install demo_umami using:
Drupal 10.0.3
PHP 8.1.14
Drush 11.5.0
and run `lando drush si demo_umami -y`
There are 8 warnings and 1 error
It is not good for a core's demo profile.
Comment #19
markconroy commentedAdding credit to @dww as per request from @Kristen Pol
Comment #20
tra.duong commentedI tried to trace and found something error:
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:
replace
<a href=:url>to<a href=\":url\">solve the error.Comment #21
tra.duong commentedI set the status to active. The trace in #20 should be the cause of the problem.
Comment #23
markconroy commentedI'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:
No errors reported. Merge request created.
Comment #24
smustgrave commentedTested 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.
Comment #25
markconroy commented@smustgrave that should not have happened. I hadn't noticed that when I created this patch. Thanks for testing.
Comment #26
cbovard commentedSubscribing
Comment #29
quietone commentedIn 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.
Comment #30
smustgrave commentedIf the content moderation block is meant to be hidden then this works.
Comment #31
alexpottThis 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...
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.
Comment #32
alexpottThis 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()
Comment #33
alexpottThis issue is really about creating an entity display with
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.
Comment #34
quietone commentedI 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'.
Comment #35
alexpott@quietone but the approach in the MR doesn't even fix half of the warnings.
Comment #37
alexpottI'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.
Comment #38
smustgrave commentedSeems to have some test failures.
Can the proposed solution be updated with the new approach
Thanks!
Comment #39
geek-merlinI 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.