Condition-1: Contributed module (with update) not being identified

2025-08-07T105720

Solution-1: SQL Query

While checking updates Drupal creates some rows inside the key_value table which should be deleted after checking is complete but looks like they doesn’t for some reason. So deleting the related rows manually solved my problem:

1
DELETE FROM key_value WHERE collection = 'update_fetch_task';

Tou can attempt to resolve it via running the below command in terminal:

1
drush sql-query "DELETE FROM key_value WHERE collection='update_fetch_task'"

(source: link)

Solution-2: hook_update_N()

If it is not possible to execute SQL queries via MySQL CLI on your server, then you might want to create a hook_update_N() in a custom module:

1
2
3
4
5
$database = \Drupal::database();
$database
  ->delete('key_value')
  ->condition('collection', 'update_fetch_task')
  ->execute();

(source: link)


Condition-2: Custom module (without update) not being ignored

2025-08-07T114429

In case you would like to ignore a module in the update check, you can do that via implmenting the hook update projects alter() hook, in the custom_module_name.module PHP file:

1
2
3
4
5
6
<?php

function custom_module_name_update_projects_alter(&$projects) {
   unset($projects['custom_module_name']);
   print(json_encode($projects)); //FOR DEBUG PURPOSE
}

For instance, to ignore module webform_handler_user_creation you need to create webform_handler_user_creation.module file with the following content:

1
2
3
4
5
6
<?php

function webform_handler_user_creation_update_projects_alter(&$projects) {
   unset($projects['webform_handler_user_creation']);
   print(json_encode($projects)); //FOR DEBUG PURPOSE
}

Reference