By carlo_martini on
I have this error in my Apache logs, when I try to install any (official) module.
[Thu May 16 12:20:01.283171 2019] [php7:notice] [pid 24843] Uncaught PHP Exception Drupal\\Core\\Extension\\Exception\\UnknownExtensionException: "The module hello does not exist." at /var/www/html/core/lib/Drupal/Core/Extension/ExtensionList.php line 522, referer: /admin/modules
That "hello" module in the error was a simple test that I made, following a guide, but it has been uninstalled and also removed from the filesystem. Also, the caches were emptied. So, why is it still looking for that?
Comments
Sounds like something went wrong with ...
removing that module. Since it already was removed from the filesystem, suggest to remove it from the database as well.
Use SQL:delete from `key_value` where collection = 'system.schema' and name = 'hello';
That was it. Thanks!
That was it. Thanks!
Didn't work
I did that, updated database, cleared cache and I'm still getting the same error.
I find the cleanest way to
I find the cleanest way to fix this issue is to re-download the module's code, and uninstall it (fixing the database issue), and THEN removing the code. This issue comes up when the module code is removed before it's properly uninstalled.
Worked for me.
Thanks!
Actually the cleanest way would have been to ...
retrieve that module from backup. In order for drupal to recognize it, it needs to be in the same location where is was when enabled. Also, it needs to be the same version as installed. Hopefully, it will uninstall properly.
Works! Thank you.
I executed `composer require drupal/missing-module` to re-download the module's core, then was able to uninstall it and fix my database issue.
See documentation for more complex scenario's
https://www.drupal.org/node/2487215
worked for me.
thank you @mmjvb
Yashesh Bhatia
works like a charm. thanks!
works like a charm. thanks!
It's worked fine.
Using below command, it helped me.
Thanks!
thks manishdrupaldev
it works
Awesome trick
That saves my day. Thanks!
Very handy
I mistakenly renamed a custom module without uninstalling it first so this query fixed the aforementioned runtime error. Thank you.
@Jill, in my case it was a
@Jill, in my case it was a custom module which was already deleted from the file system and the computer as well as the recycle bin. Thankfully it worked after a few hours of ignoring it and doing something else. Don't why it took so long to realize that the module is no longer there.
Perhaps?
Perhaps?
Thanks, it works well!
It works, but after this, I had a problem to install the same module again...
This was the missing bit for me.
I had a custom module that I renamed in the middle of development. I had already done everything else and this was the last piece that finally resolved the issue for me, thanks!
Thanks this solves my problem
Thanks this solves my problem.
Yes, this one worked for me
Yes, this one worked for me too. Thanks.
Thanks!
Works perfectly!
Works for themes as well
drush cdel core.extension theme.THEME_NAMEWorked
Thanks it worked
Thanks
It worked!
Still works! Removing swiftmailer!
Thanks, worked perfectly when trying to update a Drupal 9 site to Drupal 10, that had swiftmailer installed.
it works
thanks
Yes! Thank you sir!
Yes! Thank you sir!
Thanks!
Deleting the record in key_value also solved my problem! Thanks!!
Awesome
This worked for me
$key_value = \Drupal::service
$key_value = \Drupal::service('keyvalue'); $key_value->get('system.schema')->delete('hello');Delete module's system.schema key value works
Thanks @Mykola Veryha for the code.
I can confirm it helped fixing the issue in my case:
After uninstalling the module properly from the back-end, I enabled devel and executed the code from devel/php.
The error then disappeared and I was able to run updates as expected.
Thanks again for the help!
Another solution ..
All the above solutions were perfect but my situation was a bit different. In my case none of the solutions were working, for the reason that it was a contributed module with errors. The error was due to unsupported version and some of my custom code . I was unable to figure out whats going wrong. It was not even getting uninstalled properly.
Then I deleted the module folder completely and run SQL command to delete "key_value" but not luck. I also tried composer install. Still there was an error for the missing module under status report.
Finally I created a new folder with same module name with a .info.yaml file and uninstalled the module form frontend. Guess what, my website is error free again :)
Thanks Sumedha
Your solution work for me. I was also try to many thing but not luck.
Thanks
Thanks a lot
This solution actully worked for me, tried multiple things but no result.
Getting same error for the module views_current_path
I was getting the same error the module views_current_path does not exist at /Drupal/Core/Extension/ExtensionList.php line 522. This was happening while installing image captcha sub module from Captcha module. I was missing Views Current Path contributed module to install. After installing this module my error got resolved. You might also be missing some dependency module please check for it.
through config, drush, and editor
With drush export config: drush cex
edit core.extension.yml file, delete the row with the module_name, save
then import config: drush cim -y