How to disable module warning "User warning: The following module is missing from the file system" only visible on update.php? I have a warning when using the update.php. This warning is not visible when using : drush cc all


  User warning: The following module is missing from the file system:
  aaa. For information about how to fix this, see the documentation
  page. in _drupal_trigger_error_with_delayed_logging() (line 1128 of
  C:\www\arlande.nl\includes\bootstrap.inc).


I did run all solutions basis on : https://www.drupal.org/node/2487215

Finally I found out:
There is a record in the system table. If I delete this line using drupal it is oke and the warning is gone.

However when I use  update.php script again the warning is there again and also the record is again available in the system table.

Information in the system table is indicating: The type is a module again but the file reference is not in modules but in profile.


  profiles/aaa/aaa.profile


Big change this is profile of the initial installer but is not there any more and I'm not able to get this anymore.

I scanned all code to see if a hook is used but that 100%  not the case, so the reference should come from somewhere inside the database.

Any suggestion where the update.php file is getting this reference from in the database and/or how to solve this?
Probably you haven't uninstalled the module, so you've to either:


restore the module to its original location and uninstall it,
or manually remove all traces of the module in the database (not recommended) by:


using Module Missing Message Fixer (Drupal 7)
using Drush command:


Drupal 7

drush sql-query "DELETE from system where name = 'old_module1' AND type = 'module';"

Drupal 8

drush sql-query "DELETE FROM key_value WHERE collection='system.schema' AND name='module_name';"


When it's done, clear the site's caches: drush cr.

Or use Devel module by going to: /devel/php and execute:

$query = \Drupal::database()-&gt;delete('key_value')
      -&gt;condition('collection', 'system.schema')
      -&gt;condition('name', 'module_name')
      -&gt;execute();





See: How to fix "The following module is missing from the file system..." warning messages.