Skip to main content

Attempting to update the database, irrespective whether I run update.php or preferred method drush updb the following errors were appearing:

[notice] Module captcha has an entry in the system.schema key/value storage, but is not installed. <a href=":url">More information about this error</a>.
[notice] Module image_captcha has an entry in the system.schema key/value storage, but is not installed. <a href=":url">More information about this error</a>.
[notice] Module recaptcha has an entry in the system.schema key/value storage, but is not installed. <a href=":url">More information about this error</a>.
[notice] Module simple_sitemap has an entry in the system.schema key/value storage, but is not installed. <a href=":url">More information about this error</a>.

So what is happening and importantly how can I correct this error?

 

What is happening to get ... is not installed error?

At some point a module has been installed and then deleted from the core.extension configuration.  However, the entry in the system schema remains.  Subsequently, it is possible to be left with orphaned entries in the system.schema table.  Sometimes these orphaned entries cause problems with update.php.  Whether causing fatal errors preventing you from being able to run required updates or running updates for the partially uninstalled modules.

 

How to fix?

Fixing these types of errors, you need to remove the orphaned entries from the system.schema key/value storage system.  Whilst there is no UI for doing this, the best solution is to use drush.  You can write a Drush script to evaluate PHP code that manipulates the system schema table.

Module captcha has a schema in the key_value store, but is not installed.
Module image_captcha has a schema in the key_value store, but is not installed.
Module recaptcha has a schema in the key_value store, but is not installed.
Module simple_sitemap has a schema in the key_value store, but is not installed.

Another type of message you could see is

Module captcha has a schema in the key_value store, but is missing from your site.

The fix here is to run the following command:

drush php-eval "\Drupal::keyValue('system.schema')->delete('{module_name}');"

Obivously you need to replace the {module_name} string.  In the situation like above, this command would be repeated 4 times as follows:

drush php-eval "\Drupal::keyValue('system.schema')->delete('captcha');"
drush php-eval "\Drupal::keyValue('system.schema')->delete('image_captcha');"
drush php-eval "\Drupal::keyValue('system.schema')->delete('recaptcha');"
drush php-eval "\Drupal::keyValue('system.schema')->delete('simple_sitemap');"

 

Testing time

Check for the error and confirm it has gone.

Related articles

Andrew Fletcher04 Apr 2025
Managing .gitignore changes
When working with Git, the .gitignore file plays a critical role in controlling which files and folders are tracked by version control. Yet, many developers are unsure when changes to .gitignore take effect and how to manage files that are already being tracked. This uncertainty can lead to...
Andrew Fletcher26 Mar 2025
How to fix the ‘Undefined function t’ error in Drupal 10 or 11 code
Upgrading to Drupal 10.4+ you might have noticed a warning in their code editor stating “Undefined function ‘t’”. While Drupal’s `t()` function remains valid in procedural code, some language analysis tools — such as Intelephense — do not automatically recognise Drupal’s global functions. This...
Andrew Fletcher17 Mar 2025
Upgrading to PHP 8.4 challenges with Drupal contrib modules
The upgrade from PHP 8.3.14 to PHP 8.4.4 presents challenges for Drupal 10.4 websites, particularly when dealing with contributed modules. While Drupal core operates seamlessly, various contrib modules have not yet been updated to accommodate changes introduced in PHP 8.4.x. This has resulted in...