Problem/Motivation

reported by Fernando_Arnaboldi

"Whenever the Drupal update process fails, Drupal states that everything is up to date instead of giving a warning."

Proposed resolution

On failure, give a more clear indication that fetch fail, rather than suppressing the error.

Remaining tasks

STR for automated test

User interface changes

Change or addition to update message

API changes

n/a

Data model changes

n/a

Comments

pwolanin created an issue. See original summary.

David_Rothstein’s picture

Title: Update module reports up to date even when fetch from drupal.org failed » On certain administrative pages, the Update module reports up to date even when fetch from drupal.org failed
Priority: Major » Normal
StatusFileSize
new58.39 KB
new36.81 KB
new19.65 KB

I looked into this and the problem appears to be overstated. Most places in the Drupal admin UI actually tell you just fine that the updates failed to be fetched. Only one page does not.

My test method:
1. Cut off my internet connection.
2. Click the "check manually" link on the updates page.

Screenshots below are from Drupal 7 but Drupal 8 is similar.

The main updates page (admin/reports/updates) makes quite clear that there was a problem checking updates:

So does the status report page:

However if you go to the "Update" tab on the above page (admin/reports/updates/update) that's the only place where there seems to be a problem:

David_Rothstein’s picture

Status: Active » Needs work
StatusFileSize
new23.22 KB
new1.69 KB

Here's a possible patch. I wrote it for Drupal 7 since that's where I was debugging, but could probably be ported to Drupal 8 pretty easily.

With the patch the page looks like this:

Note there's also a somewhat annoying issue that after your internet connection is restored, Drupal waits five minutes before it will try to connect again - and I think maybe it's extending that 5 minutes each time you click "Check manually". So if you keep clicking that, it keeps telling you the connection failed. But that's a separate issue.

David_Rothstein’s picture

Quick self-review (can be taken into account when rerolling for Drupal 8):

  1. +  $some_updates_not_fetched = FALSE;
    

    Something like $all_updates_fetched = TRUE may be easier to read than the above double-negative.

  2. +    drupal_set_message(t('There was a problem checking <a href="@update-report">available updates</a> for some of your modules or themes.', array('@update-report' => url('admin/reports/updates'))), 'warning');
    

    Instead of adding a new string that needs to be translated, I think there may already be a string that's very close to this one in the codebase that maybe would be close enough to reuse here.

mgifford’s picture

Status: Needs work » Needs review
StatusFileSize
new1.91 KB

This is just a straight re-roll. I think the suggestions in #4 make sense though. may re-roll it again. Hopefully this helps push this issue ahead.

Status: Needs review » Needs work

The last submitted patch, 5: update-fetch-fail-2646306-5-D8.patch, failed testing.

mgifford’s picture

Status: Needs work » Needs review
Issue tags: +Needs tests
StatusFileSize
new1.88 KB

1) New patch uses $all_updates_fetched = TRUE and switches logic accordingly.

2) There is 'There was a problem checking <a href=":update-report">available updates</a> for your modules or themes.' in core/modules/update/update.module

Seems close enough. We're just one word away, "some". Is it close enough?

Status: Needs review » Needs work

The last submitted patch, 7: update-fetch-fail-2646306-7-D8.patch, failed testing.

The last submitted patch, 7: update-fetch-fail-2646306-7-D8.patch, failed testing.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

dww’s picture

Title: On certain administrative pages, the Update module reports up to date even when fetch from drupal.org failed » On the form to install updates, the site reports up to date even when fetch from drupal.org failed
Status: Needs work » Closed (duplicate)
Issue tags: -Needs backport to D7, -Security improvements, -Needs tests +Bug Smash Initiative
Parent issue: » #1538118: Update status does not verify the identity or authenticity of the release history URL
Related issues: +#961060: If a module is Not Supported, Drupal's warning links to available updates page, which says everything is OK

Thanks for opening this issue, and sorry for the delayed reply!

From what I can tell, the only page this issue is concerned with is the form to install missing updates at /admin/reports/updates/update

That's going to start complaining if you can't fetch available update data thanks to #1538118: Update status does not verify the identity or authenticity of the release history URL

See also #961060: If a module is Not Supported, Drupal's warning links to available updates page, which says everything is OK

Given those two issues, I think it's safe to call this duplicate.

Cheers,
-Derek