Problem/Motivation
update_fix_compatibility()
is just remove modules and themes that don't exist.
Steps to replicate
- delete a module from the modules folder
- run updates
- restore the module and try to enable it
You can't enable nor uninstall. But it does point to the process of disabling the module leaving things in a corrupt state.
Proposed resolution
Add an requirement error when the module list or theme list is wrong. We can't fix things really because at least in the case of modules we have no idea what to do. With themes potentially we could force an uninstall with no code present but then again we're making changes without really knowing what the user wants.
Looks something like:
Steps to test:
- Install standard
- Enable stark theme
- Remove dblog, page_cache and stark
- Set update free access in settings.php
- Visit update.php