Draft: Issue #3112005: Keep a View when a display-only handler loses a dependency
When a module is uninstalled, a View is deleted if one of its handlers comes from that module. In core, only EntityField and ModerationStateFilter can remove themselves. Other handlers cannot, so the whole View is deleted.
This change removes field, sort, header, footer and empty handlers that depend on removed config or an uninstalled module. The View is then disabled, not deleted.
Filters, arguments and relationships are not removed. Removing them could change which results the View shows. See comments #60 and #64. In that case the View is still deleted, as before.
Steps to test
- Add a header area from a contrib module to a View. Example: Views Filters Summary.
- Uninstall the module.
- Before: the View is deleted. After: the View is disabled and only the header is removed.
New tests in ViewsConfigDependenciesIntegrationTest:
-
testHandlerProviderUninstall: the View is kept and disabled. -
testFilterProviderUninstall: the View is still deleted.Generated with the help of an LLM.