14

I cannot update some of the modules and the Drupal core itself from "Available Updates" menu. The error is "No available releases found". However, I can list the updates with drush ups.

screenshot

screenshot

Why?

4
  • How did you install them?
    – Kevin
    Commented Mar 27, 2017 at 19:36
  • Update manager was buggy so I manually downloaded the tar.gz files and extracted under modules directory and then enabled under extensions menu. I did it same way for all modules but only a few of them are giving this error...
    – madpoet
    Commented Mar 27, 2017 at 20:30
  • Have you done a manual check of available updates (click on the "Check manually" link shown above). If this produces the same result, can you confirm that you do not have multiple copies of the modules present in your codebase?
    – jlscott
    Commented Mar 27, 2017 at 22:33
  • @jlscott yes I checked manually, the screenshot is taken right after checking. No duplicate directories under modules directory, is there any other place for modules?
    – madpoet
    Commented Mar 28, 2017 at 5:46

6 Answers 6

42

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:

DELETE FROM key_value WHERE collection = 'update_fetch_task';

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:

$database = \Drupal::database();
$database
  ->delete('key_value')
  ->condition('collection', 'update_fetch_task')
  ->execute();
1
  • We had LOADS of modules which could not detect an available update through the UI. We were able to get security updates via drush, but with other update checking removed from drush, it's nice to have this interface. Anyways, Solution 1 here worked for us. Thank you for this.
    – Loopy
    Commented Oct 28, 2022 at 13:50
6
drush sql-query "DELETE FROM key_value WHERE collection='update_fetch_task'"

using drush Fixed for me

1

Use the Devel module, and in /devel/php enter the following code.

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

According to this post https://www.drupal.org/project/drupal/issues/3120168, if you click on "Check manually", it fixes the problem. I tried it and it worked.

Edit: I used this method on Drupal ^8.8

1
  • This is a first step for troubleshooting the problem. If this doesn't work, you need to use @madpoet 's fix above.
    – Loopy
    Commented Oct 28, 2022 at 13:53
1

I couldn't find the key_value table anywhere.

After a lot of research, I stumbled upon this article by Marius Cârneală. https://www.mariusc.name/content/no-available-releases-found-drupal-error-fix

His SQL command worked for me: truncate cache_update

You can run it via this drush command:

drush sqlq "truncate cache_update;"
1
  • The drush command worked perfectly (on Drupal 7.x), thanks! :) Commented Jun 3, 2021 at 7:18
0

DELETE FROM key_value WHERE collection = 'update_fetch_task' worked where "update manually", "update cron" and "clear all caches" didn't.

Not the answer you're looking for? Browse other questions tagged or ask your own question.