Drupal Core Files in sites/all/modules (fix)
It’s probably happened to more people than that would admit it. You put the drupal core modules that belong in the Modules folder at the root of a drupal install into sites/all/modules. Once the core modules are in sites/all/modules that’s the only place where drupal recognizes them.
Even worse, the database sees the files there and so if you remove them from sites/all/modules the website will break.
Here’s the proper procedure to move the core files back to where they belong and out of sites/all/modules:
- Install latest modules and put all core modules where they belong: in the modules folder found at the root of the install.
- Delete all core modules from where they shouldn’t be. (sites/all/modules/)
- You may want to check to ensure that you’ve detected all the core modules in the wrong place by running this module detection snippet.
- In phpmyadmin run this query under the system table (assuming the core modules are in sites/all/modules):
UPDATE system SET filename = REPLACE (
filename,
'sites/all/modules/',
'modules/'); - Run core update.
- Visit Sites/all/modules
