Hi,

Just installed latest D7 version and noticed that each time I reload the page a random number of modules are listed. Not the same modules each time either.

I noticed that when I enter a note for the modules they will be listed next time and new ones show up. For now I have enetered a '-' as a note for each module so they get listed but I don't think this is how it's supposed to work :)

Cheers

Comments

hass’s picture

Same here, xou may need to hit save several times until the list is complete.

klonos’s picture

As I've previously said here #1418870: Notice: Undefined index: title in theme_update_advanced_settings() in sites/all/modules/update_advanced/includes/settings.inc, this behavior seems to happen every time #512218: Checking for available modules fails for most of the modules occurs (that's a core bug). So, perhaps we should help get that fixed first and then see if this one here persists.

hass’s picture

Priority: Normal » Critical

The repro case here is to run update.php and then look on the update_advanced settings page and the table is incomplete. With every page reload the table becomes larger. On large sites you may need to reload 20 times. If you change anything and Save before the table is complete all configuration data get's lost.

Additionally the latest available version is missing in the warn if out of date selectbox.

deanflory’s picture

I have this happening on two different sites, one with lots of modules installed and one with 30 or so. Clearly it is not accurate at all and appears to show a random amount of modules without those displayed being in alphabetical sequence or anything, just random.

nancydru’s picture

I have a site in which I have development versions of two of my modules, so I just wanted to stop flagging those. Submitted_By shows up in the list, but Util does not. I have refreshed the page many times and it remains this way.

aohrvetpv’s picture

Issue summary: View changes

Cannot reproduce this. All modules are always listed in the table at admin/reports/updates/settings. Perhaps this was fixed by a core change.

Does anyone have reliable steps to reproduce it? I tried #3 but all modules are listed.

hass’s picture

You need a large list of modules and themes.

aohrvetpv’s picture

Thanks, hass. Is 50 enough?

Here is what I tried:
1. Installed latest Drupal 7 release.
2. Downloaded the top 50 projects by usage (https://www.drupal.org/project/usage).
3. Downloaded/enabled Update Status Advanced Settings.
4. Browsed to admin/reports/updates/settings. Only 2 projects are shown: Drupal and Update Status Advanced Settings.
5. Checked "Check for updates of disabled modules and themes". Pressed "Save configuration".
6. Verified that page now lists 52 projects (top 50 + Drupal + Update Status Advanced Settings).

aohrvetpv’s picture

Perhaps there is a timeout that is being reached when this problem occurs. It takes ~10s from the time I press "Save configuration" until the page reloads with the complete list of modules. I imagine this time varies depending on network conditions and the number of projects being checked, and for some sites it could take longer and exceed some timeout before all update checks are completed.

Could someone possibly confirm this is still occurring? I think there may have been some work done to improve the performance of updates checking on either drupal.org or in the Update module, which may have eliminated this problem.

hass’s picture

Yes, it is a timeout. Every module is checked and if this takes a bit longer it times out before all modules have been checked. In this case the list is incomplete. Not sure why you are not able to repro.

aohrvetpv’s picture

Able to reproduce it now by setting update_max_fetch_time to 5. It defaults to 30.

So a workaround for this problem may be to set update_max_fetch_time to a larger value, like 300. update_max_fetch_time may not be the only timeout involved, though.

aohrvetpv’s picture

Status: Active » Needs review
StatusFileSize
new4.19 KB

This patch changes to always list all projects. It uses the change suggested by hass in #1963458-1: Caching does not flush/refresh project data properly. Please review.

Recommended version information may not be available for all projects. This can happen when an updates check is incomplete (e.g. due to the check exceeding update_max_fetch_time seconds). The patch handles it by project as follows:

  • If there is a recommended version, add an option to ignore that version.
  • If there is no recommended version, but an administrator had set a version to be ignored, add an option to ignore that version. This keeps the setting to ignore that version from being lost if the configuration is resaved.
  • Otherwise, there is no known version to ignore, so there is no option to ignore a specific version. (This does not seem like a problem, because in this case there is nothing that needs to be ignored. An administrator will not receive update notifications for a project if the Update Manager module knows no recommended version.)

The fact that updates checks are sometimes incomplete (and hence there is incomplete recommended version information) is an Update Manager module issue.

aohrvetpv’s picture

update_max_fetch_time was increased in core from 5 to 30 in May 2014, which probably eliminated this problem for most sites:
http://cgit.drupalcode.org/drupal/commit/?id=5a84df0

However, incomplete updates information could still occur under certain conditions, so it is worth changing Update Status Advanced Settings to better handle it. Please review patch in #12.

francewhoa’s picture

Component: User interface » Code
Status: Needs review » Reviewed & tested by the community

Confirming the patch in comment #12 works. Thanks AohRveTPV :)

We tested that patch with a large site. Which has 136 modules enabled.

During testing we found one remaining bug. But we assumes that that bug is related to the Drupal core Update Manager module not update_advanced? Here are the steps to reproduce that bug:

  1. Install the patch in comment #12
  2. When a module is not showing in the list at /admin/reports/updates/settings
    Write down that module name. For example feeds module
  3. Run the following Drush commands
    1. drush dis update_advanced
    2. drush cc all
    3. drush pm-uninstall update_advanced
    4. drush cc all
    5. drush en update_advanced
    6. drush cc all
  4. Go to /admin/reports/updates Click on (Check manually) link.
  5. Go to /admin/reports/updates/settings Notice that the missing module is now showing in that "update_advanced" list. So far so good. Optionally, do not change any settings yet. Click on "Save configuration" button to write fresh settings to the database.
  6. Go to /admin/reports/updates Do nothing.
  7. Go back to /admin/reports/updates/settings Notice that the missing module is NOT showing anymore in that update_advanced list. This is the bug. We assumes that that bug is related to the Drupal core Update Manager module?

Using

  • update_advanced 7.x-1.x-dev from 2013-Oct-19
  • Drupal 7.39 The tests we did were not with a fresh Drupal install though. We used an old Drupal site on a off-line development environment.
  • update_max_fetch_time at 30
  • We also tested update_max_fetch_time at 120 with same result