I get this error after upgrading to Drupal 8.3.1 with Bootstrap 3.3.0.
panels module :
8401 - Uninstalls Layout plugin, then enables Layout Discovery.
lightning_layout module :
Force-reloads all modules to avoid Search API collision with Panelizer.
page_manager module :
Rename layout machine names in config entities to match layout discovery's default layouts.
panelizer module :
Rename layout machine names in config entities to match layout discovery's default layouts.
Do you wish to run all pending updates? (y/n): y
The service "plugin.manager.bootstrap_layouts" has a dependency on a non-existent service "plugin.manager.layout_plugin". [error]
Performing panels_update_8401I tried the patch in #11 here but to no avail: https://www.drupal.org/node/2867565
Any idea of how I could resovle my problem? Thanks a lot
| Comment | File | Size | Author |
|---|---|---|---|
| #31 | the_service-2872751-31.patch | 3.5 KB | markhalliwell |
Comments
Comment #2
criscomComment #3
criscomComment #4
markhalliwellThis isn't due to the base theme.
You need to update the bootstrap_layouts module to the 8.x-5.x version as indicated on its project page.
Also, see #2867535: Bootstrap Layouts 8.x-4.1 incompatible with Drupal 8.3.0
Comment #5
criscomThanks for pointing me in the right direction. My site is screwed as I updated the database too early. No love.
Comment #6
criscomHi markcarver,
I applied the patch from here: https://www.drupal.org/node/2868095 but this didn't fix my problem, either.
Then I installed
drupal/bootstrap_layouts (dev-5.x dfc2f7a): Cloning dfc2f7ab34 from cache. With this version above patch doesn't apply, obviously because it is already in that dev version.When I run
drush crI keep gettingAny idea of how I could resolve this? Thanks, a lot, this happened on a site that was to go about live. I am a bit desperate here. Thanks for your time!
Comment #7
criscomComment #8
markhalliwellThe steps laid out in #2867535: Bootstrap Layouts 8.x-4.1 incompatible with Drupal 8.3.0 is the only way you can get the new version of bootstrap_layouts to work with core 8.3.0+
Comment #9
mfernea commentedThis is not yet fixed. Maybe we should close this as duplicated.
Comment #10
markhalliwell@mfernea, this isn't really related to that issue at all and it's not really a bug.
This is about upgrading to 8.3.0 and the very specific/manual steps required to upgrade to 8.3.0 which are laid out in #2867535: Bootstrap Layouts 8.x-4.1 incompatible with Drupal 8.3.0.
Comment #11
BigEd commentedI am also stuck in this loop, I have tried the steps noted above but I get an error with Drush so I can not update the Database to switch the layout discovery plugin.
I am running the latest versions of everything its just when I run the update.
drush updatedb -y && drush crI am thinking this may need to be some custom code to force it to make the switch in the database. I am playing with this as we speak so if any suggestions or pointer would be appricated.
I will post back with my findings..
Comment #12
aspilicious commentedI think I know the problem will provide feedback tomorrow.
Comment #13
aspilicious commented@markcarver there is an issue with your code. Had the same problem with DS, alexpott fixed it.
See http://cgit.drupalcode.org/ds/commit/?h=8.x-3.x&id=d2b9dfe81d5393ed8fd6d...
Problem is that update.php triggers theme_registry_alter which tries to load the plugin manager that doens't exist yet (before upgrading)
Comment #14
alexpottHere's a patch.
Comment #15
alexpottOne thing I'm wondering is how come there is not an update like
To ensure that layout_discovery is installed - so moving from previous versions of bootstrap_layouts is as seamless as possible.
Comment #16
markhalliwellWhy is this returning an array from an alter hook? The parameter is passed by reference, no? Shouldn't it just simply return?
That fails when
layout_pluginis installed: http://cgit.drupalcode.org/drupal/tree/core/modules/layout_discovery/lay...Uninstalling
layout_pluginalso tends to be a manual process because of how other contrib projects require it as a dependency.Depending on how one's site is configured and what tools are used, upgrading is inherently difficult and does not seem to be able to be automated via an update hook, especially in a 3rd tier project like this one (i.e. layout_discovery > ds > bootstrap_layouts).
Comment #17
alexpottThe return array was a simple copy&paste error.
Comment #18
zenimagine commentedI tried the patch but it does not work for me :
Emplacement https://dev.site.com/admin/structure/types/manage/article/display?_wrapp...
Référent https://dev.site.com/admin/structure/types/manage/article/display
Message RuntimeException: The subform and parent form must contain the #parents property, which must be an array. Try calling this method from a #process callback instead. in Drupal\Core\Form\SubformState->getParents() (line 76 of /home/dev.site.com/public_html/web/core/lib/Drupal/Core/Form/SubformState.php).
Importance Erreur
Comment #19
markhalliwell@alexpott, I was about to commit the above patch, but when reading the issue title, it doesn't match this issue.
The OP indicates that the issue is with http://cgit.drupalcode.org/bootstrap_layouts/tree/bootstrap_layouts.serv... where it's attempting to inject
plugin.manager.core.layoutduring the update process.The theme registry stuff is rather superfluous in this case or, at the very least, could be considered as a separate issue.
I've left it in for now though, because I'm not entirely sure that it's unrelated.
---
@zenimagine, that is an entirely separate issue (#2868254: RuntimeException : The subform and parent form must contain the #parents property, which must be an array.) and not even related to this one.
Comment #20
aspilicious commented"The theme registry stuff is rather superfluous in this case or, at the very least, could be considered as a separate issue."
It is not, running update.php triggers the maintenance theme which triggers the alter. Trust us (me and alex), you need that fix.
Comment #21
alexpott@markcarver this is why I was asking about why you are not ensuring that the module is installed? Ie something like
Because atm your code is using the service before you've ensured that.
Comment #22
BigEd commentedtried the patch #19 and added alexpotts update like this..
But its failing before this is run with the error.
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service "plugin.manager.bootstrap_layouts" has a dependency on a non-existent service "plugin.manager.core.layout". in Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processReferences() (line 58 of /var/www/drupal/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php).As this error is breaking drush before the update in the installer I am left unable to run the update for the plugin manager to do the check.
Comment #23
aspilicious commentedPlease read the thread carefully, you also need #17: https://www.drupal.org/files/issues/2872751-17.patch
@markcarver can you please fix this... I get questions every day in IRC because of this.
Comment #24
markhalliwellI already explained this in #16.
---
I'm not entirely sure what should be "fixed" at the moment.
The following "error" has absolutely nothing to do with the theme registry alter or database updates:
This error is a result of services being rebuilt. This can occur during an update, yes, but is not directly related to it as I explained above and in #19.
Obviously, the prior patches and solutions provided have not "fixed" this error in any way as evidence by #22.
---
That being said, I'm still not convinced there is actually anything wrong here. Rather that some individuals simply do not understand how services/dependencies work in 8.x.
As I have stated many times before (in #2867535: Bootstrap Layouts 8.x-4.1 incompatible with Drupal 8.3.0), this is a rather complex "manual update" due to the contrib -> core API changes.
The exact "upgrade steps" greatly vary depending on the site build and tools used.
This error may be generated simply due to a missing and necessary "upgrade step".
Personally, I have not seen this error, but I suspect that is because I ensure the DB/config/installed modules are properly configured prior to running the site or any CLI commands that may fully bootstrap the site prior to the "upgrade".
Comment #25
aspilicious commentedThere is a problem... I'll try to explain the scenario.
1) You're on drupal 8.2 with old ds and old bootstrap
2) You want to upgrade, so you do a composer update of drupal core, ds, bootstrap, ... (all at once)
3) You run update.php
==> BOOM
Why?
When accessing update.php, the maintenance theme gets loaded which trigger the theme registry which tries to run the following line
"$layouts = \Drupal::service('plugin.manager.core.layout')->getDefinitions();"At this point nu updates have been fired yet so the new core layout module is not yet enabled, because the theme alter runs BEFORE the updates have a chance to install the core module.
If you don't believe me, recreate the above scenario...
Comment #26
BigEd commentedFinally, yep I tried with the patch on #17 as well and got to the error.
As the sites stuck with the new dependency on bootstrap layouts it breaks Drush so to get out of it I removed the boostrap_layouts out of the code base, then ran.
This restored the site.
Comment #27
hs@henrikstrindberg.se commented# 26 worked for me.
Thanks!
Comment #28
chadhester commentedDitto. #26 worked for me, too. The key was removing bootstrap_layouts from the codebase first.
Comment #29
eidoscomAlso #26 worked for me! Thanks a lot, I was very worried as my site was unusable!!
Comment #31
markhalliwellI still don't believe what @aspilicious and @alexpott have suggested are the actual root causes for this very specific error (as evident by #22 and #26).
Personally, I think this is simply a deeper byproduct of the radical contrib -> core API changes that occured and just requires a little extra manual TLC (especially for a 3rd tier module like this one).
Regardless, I have gone ahead and committed their suggestions in hopes that it will at least help (in any small margin) to eliminate any technical aspect of the issue.
Whether it actually works 100% of the time and depending on the tools used and how the the site was built... is another story all together.