- 🇦🇺Australia elc
This is indeed the exact same issue as 2920285.
I proposed a solution (patch) to fix core there which clears away all of the expired data before running either a manual check, or the main scheduled updates check. Patched into core it works quite well to keep the NARFs at bay: #2920285-50: Update module can get 'stuck' with 'no releases available' → .
Until this is all fixed, I also created a module which also clears out all of the dud state before running so I don't need another core patch: Update NARF!.
The other option is to re-write the update manager to not use multiple state data sources to manage the update process. The contents of the keyvalue:update_fetch_task is never actually referenced, so this could be used for storing useful information like when it was created so that if the queue runner item for it disappears, it can easily be re-created to complete the job. At present it's only used as a semaphore which blocks the fetch task from being re-triggered.
Updating referenced core to 11.x because this bug (same as 2920285) still exists there too.
- 🇺🇸United States websiteworkspace
A problem that appears similar the problem described throughout this thread occurred after updating a site to D10.2.4.
After the 10.2.4 update, The "available updates" report displays only about 5 out of 60 or more installed contrib modules and themes.
None of the suggestions provided in this thread have solve the problem.
-
1. When the "available updates" report broke, it continues to list a few modules, but not all.
2. Modules installed after this problem began appear correctly in the "available updates" report.
3. executing the following command via drush does not repair the problem:php -c ./php.ini vendor/bin/drush php:eval "\Drupal::keyValue('update_fetch_task')->deleteAll();"
4. installing the https://www.drupal.org/project/update_narf → module does not repair the problem.
5. the following drush command displays all the contrib modules. Obviously drush is doing something different from the "available updates" report.
php -c ./php.ini vendor/bin/drush pm-list --type=Module --no-core --format=list
5. Does anyone have any additional suggestions or insights about this problem and about how to repair it?
6. applying the patch below does not repair the problem. However, the patch does not appear to break anything.
diff --git a/core/modules/update/src/UpdateProcessor.php b/core/modules/update/src/UpdateProcessor.php index a07a47c8f5..c4de5df0a3 100644 --- a/core/modules/update/src/UpdateProcessor.php +++ b/core/modules/update/src/UpdateProcessor.php @@ -121,7 +121,7 @@ public function createFetchTask($project) { if (empty($this->fetchTasks)) { $this->fetchTasks = $this->fetchTaskStore->getAll(); } - if (empty($this->fetchTasks[$project['name']])) { + if (empty($this->fetchTasks[$project['name']]) || $this->fetchTasks[$project['name']] !== $project) { $this->fetchQueue->createItem($project); $this->fetchTaskStore->set($project['name'], $project); $this->fetchTasks[$project['name']] = REQUEST_TIME; diff --git a/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php b/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php index 4573cff6c0..87fc2f03a9 100644 --- a/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php +++ b/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php @@ -193,12 +193,12 @@ public function testFetchTasks() { $this->assertEquals(2, $queue->numberOfItems(), 'Queue contains two items'); // Try to add a project again. update_create_fetch_task($project_a); - $this->assertEquals(2, $queue->numberOfItems(), 'Queue still contains two items'); + $this->assertEquals(3, $queue->numberOfItems(), 'Queue still contains three items'); // Clear storage and try again. update_storage_clear(); update_create_fetch_task($project_a); - $this->assertEquals(2, $queue->numberOfItems(), 'Queue contains two items'); + $this->assertEquals(4, $queue->numberOfItems(), 'Queue contains four items'); } /** diff --git a/core/modules/update/update.install b/core/modules/update/update.install index b77654d622..b067b788dd 100644 --- a/core/modules/update/update.install +++ b/core/modules/update/update.install @@ -87,6 +87,8 @@ function update_uninstall() { $queue = \Drupal::queue('update_fetch_tasks'); $queue->deleteQueue(); + + \Drupal::keyValue('update_fetch_task')->deleteAll(); } /*