- 🇬🇧United Kingdom catch
There are several hundred sites that need to uninstall the views_ajax_get module in 10.1. It doesn't implement the hook_uninstall() workaround. Bumping to critical since this leaves sites hosed.
- 🇯🇵Japan tyler36 Osaka
This bug prevents Gutenberg module from being uninstalled when using webprofiler module. See #3261040
- First commit to issue fork.
- Merge request !11221Uninstalling a module providing display extenders causes fatal errors → (Open) created by tobiasb
- 🇩🇪Germany tobiasb Berlin
I do not understand, whether is missing todo or not. just with the patch views does not add the dependency via \Drupal\views\Plugin\views\display\DisplayPluginBase::calculateDependencies. It does also not call \Drupal\views\Plugin\views\display_extender\DisplayExtenderPluginBase::applies.
There is a plugin_type display_extender in \Drupal\views\Plugin\views\display\DisplayPluginBase::getAllPlugins, but always NULL, when used in \Drupal\views\Plugin\views\display\DisplayPluginBase::calculateDependencies.
I believe we need something like #2426607: Calculates and adds dependencies of views display extender → , which use \Drupal\views\Plugin\views\display_extender\DisplayExtenderPluginBase::applies.
- 🇩🇪Germany tobiasb Berlin
Ok, as mention in #2426607: Calculates and adds dependencies of views display extender → a dependency is not a option because this would delete the view.
Therefore -> views_modules_uninstalled clean-up the config and ViewsConfigUpdater cleanup the config for uninstalled extender.
- First commit to issue fork.
- 🇮🇳India mohit_aghera Rajkot
I evaluated two solutions for the issue.
- Modify/cleanup the views in
hook_modules_uninstalled
hook - Implement a new module uninstall validator for the display handler plugins Comment #19
Modify/cleanup the views in
hook_modules_uninstalled
hook
- I feel this might not work in this case.
Reason is, that we can't fetch the list of all the display handler plugins provided by the module being uninstalled.
In the uninstall() function, this hook is the last one to get called https://git.drupalcode.org/project/drupal/-/blob/11.x/core/lib/Drupal/Co...Since plugin ID or anything won't be available here, we can't identify which display handler plugins we want to unset from views config.
I evaluated another option to check the plugin by doing namespace-based lookup, however, that seemed a bit hacky to me.
Considering that, it might not be straightforward to update all the views and unset the display handler plugins.
We can certainly disable the plugin in views > Advanced config settings.Implement a new module uninstall validator for the display handler plugins Comment #19
This worked fine and prevented module being uninstalled.
I added on validator plugin along with kernel test to validate the exception.
This seems to be working fine.I feel at this point we should go ahead with the approach where we display a warning rather than silently updating the views config.
- Modify/cleanup the views in