1

I installed Drupal 9.3.6.

At /admin/reports/status, I see the error:

There are security updates available for one or more of your modules or themes

and at /admin/modules/update, two modules are listed: PHP 8.x-1.1 and Remote Stream Wrapper 8.x-1.5.

However, for both these modules the recommended version is the already-installed version.

  • How do I see more details about the reason for the errors?
  • Alternatively, can I make Drupal ignore these two modules?

2 Answers 2

1

There are security updates available for one or more of your modules or themes isn't the more appropriate message that is correct in every case. It assumes that, once a release has been marked as insecure, a new release is created, but that doesn't always happen, for example because the project owner or one of the maintainers failed to fix the security issue.

In the specific case:

Implementing hook_update_status_alter() in a module, you can set those modules as ignored.

use Drupal\update\UpdateFetcherInterface;

function mymodule_update_status_alter(&$projects) {
  if (isset($projects['php'])) {
    $projects['php']['status'] = UpdateFetcherInterface::UNKNOWN;
    $projects['php']['reason'] = t('MyModule prevents Drupal from receiving information about module updates .');
  }
  if (isset($projects['remote_stream_wrapper'])) {
    $projects['remote_stream_wrapper']['status'] = UpdateFetcherInterface::UNKNOWN;
    $projects['php']['reason'] = t('MyModule prevents Drupal from receiving information about module updates .');
  }
}
1
  • Thanks. This code seems to prevent the permanent error being shown while not hiding that the modules are problematic.
    – jhnc
    Commented Feb 22, 2022 at 19:34
0

Sometimes Drupal messages regarding module updates can be outdated and can be fixed by manual check for updates from the /admin/reports/updates page: enter image description here

Also, some error messages can be shown because of the "Remote Stream Wrapper" module's status: enter image description here

To avoid receiving such messages you can:

  1. Uninstall the Update MAnager module.
  2. Try to use the hook_update_projects_alter

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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