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
Remaining tasks
User interface changes
Screenshots
API changes
update_fix_compatibility will no longer attempt to fix incompatibility, and is deprecated. This is necessary because it's the 'fixing' that puts sites into an unrecoverable state.
Data model changes
Release notes snippet
update_fix_compatibility()
has been deprecated. Sites with incompatible or missing modules or themes will need to correct the issue in the codebase prior to running database updates. See update.php will no longer attempt to automatically remove modules for more information.