- ๐ฎ๐ณ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
- First commit to issue fork.
- ๐ง๐ชBelgium kristiaanvandeneynde Antwerp, Belgium
Been seeing ConfigTranslationUiModulesTest fails across multiple issues today.
- ๐จ๐ฆCanada joelpittet Vancouver
That looks great, thanks for the red/green tests. I scoured over the code and didnโt spot anything concerning.
- ๐ง๐ชBelgium kristiaanvandeneynde Antwerp, Belgium
All green and the "test-only changes" job shows the failure we want to see.