added BS4, activated module, went to content display settings, select bs 1col to test out the module, clicked save = WSOD with no logged messages.
uninstalled module, went to content display settings, then error page with:
"The website encountered an unexpected error. Please try again later.
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "bs_1col" plugin does not exist. in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 52 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php)."
can't even revert to my previous display settings...
Display suite 8.x-2.6
Layout plugin 8.x-1.0-alpha23
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | validate_module_uninstall-2834394-10.patch | 14.09 KB | markhalliwell |
Comments
Comment #2
markhalliwellI'm inclined to say that this is really a DS bug (or whatever module that implements layout selection... maybe even layout_plugin) for not catching the exception when a layout isn't found (e.g. broken plugin). Should probably search their queue or create another related issue to this one too.
That being said, it probably wouldn't hurt for this module to loop through existing layouts prior to uninstall and... change/unset them? Just not sure to what or how that would be feasible given we don't know the new layout regions. Maybe just find first available layout with first available region?
In the mean time, easy work around is to reinstall the module (via drush or drupal-console), go back to that page, switch layouts to something not provided by this module and then uninstall it.
Comment #3
telegraph commentedI would, were it not for the WSOD for that content type's view mode
Comment #4
markhalliwell/admin/moduleswhich is all you need to re-enable the module.drushordrupal-consoleto enable it instead since it's via terminal and not the site itself.Comment #5
telegraph commentedHi Mark, thanks for your responses, and my apologies for not being clear: the problem is not enabling/disabling the module.
The WSOD happens on the view mode for the page (my view mode is called 'landing', the WSOD happens on /admin/structure/types/manage/page/display/landing - the very page I'm supposed to revert to the old display type).
The other displays work fine, the end pages work, everything works fine, what doesn't work is editing the display for that view mode because that's where the WSOD is. So I can't even re-order the fields or anything anymore for that view mode
Comment #6
telegraph commentedattached a screenshot
Comment #7
markhalliwellYes it is.
You have uninstalled a module that was providing an active layout to something.
You cannot just "simply remove it" and then continue to expect something that was using it to keep on working.
The reason you're getting a WSOD is because the module which provides the layout (plugin) is not installed, thus causing a fatal exception about a "missing plugin".
If you simply enable the module (for just a quick second) and rebuild the cache, that page will suddenly start to work.
Once it's re-enabled, only then will you be able to switch the layouts to something else.
After you've chosen a layout other than Bootstrap Layouts, you can safely uninstall the module again.
Comment #8
markhalliwellSo, there's actually a
ModuleUninstallValidatorInterfacethat will allow us to loop through and detect which instances are using the layouts for the provided handlers. This would actually prevent the module from being able to be uninstalled at all and also provide "reasons" to assist in locating where they're being used:They'll even show up in Drush. Currently there's a bug that will show it via a thrown exception, but https://github.com/drush-ops/drush/pull/2494 will make it look better (like the above image).
Comment #10
markhalliwellComment #11
markhalliwellThis is technically a feature.
Comment #12
telegraph commentedI understand your reasoning in #7, but the problem was selecting a bs layout, saving this and then getting a white screen: I could not go back into the page settings and remove the layout (which is why I attempted the module uninstall, in hope I could correct it that way).
But beyond this, the 8.x-4.1 release corrected all these problems for me and works great, so thank you very much.
I checked the new validate module uninstall functionality and that works great too, it's also appreciable to have the location of the layouts listed.
Cheers for the fix! :)