8

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
    Mar 27 '17 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
    Mar 27 '17 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
    Mar 27 '17 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
    Mar 28 '17 at 5:46
25

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

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

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! :) Jun 3 at 7:18
0

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

0

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

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

using drush Fixed for me

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