0

I have a D7 (7.69) site. On both dev and production, I can update a module (using the web UI - /admin/modules/update), apparently successfully, yet afterwards, that module stays listed as requiring an update with Installed Version and Recommended Version exactly the same.

e.g.

Adminimal - Responsive Administration Theme (Theme)
Installed version 7.x-1.26
Recommended version 7.x-1.26

(I've seen it with themes, such as the one above, and modules such as Views).

I've tried:

  • clearing the cache
  • downloading a clean latest version to a new directory, and comparing the md5hashes of all files between the two (as well as simpler checks like the module .info file.)
  • wiping the module/theme directory and replacing with a freshly extracted .tar.gz
  • checking if any database updates are pending (they're not)

Is there anything else that could be causing it to get stuck?

I've looked at the system table - specifically the system.info field - but nothing looks "wrong".

  • wiping the module/theme directory when you do this, does the message disappear? just wondering if perhaps you have duplicate modules/themes under the /core folder or somewhere else in your code base. – No Sssweat Feb 14 at 0:07
  • @NoSssweat - good suggestion, but yes (e.g. deleting /sites/all/modules/views clears it from the Update list, and it reappears as soon as it's downloaded and extracted again, same if I also delete the row from the system table). – William Turrell Feb 14 at 12:45
  • 1
    @NoSssweat just FYI, caused by another module changing the status in a hook, as per my answer. – William Turrell Feb 14 at 16:04
1

This was caused by the Update Status Advanced Settings (update_advanced) module.

I didn't know this module was installed or what it was, so here's how I traced it back:

modules/update/update.compare.inc is where the core update module checks versions of each module and theme, beginning with update_calculate_project_data() - this creates a $project array that contains current/recommended versions, plus a numeric 'status' key.

'status' is a constant, set in modules/update/update.module, with values including:

define('UPDATE_CURRENT', 5); // project is up to date
define('UPDATE_NOT_CHECKED', -1); // Project's status cannot be checked.

I used Xdebug on update_calculate_project_data(), specifically tracking the modules that were stuck on the update screen.

They all had a status of UPDATE_CURRENT initially (as expected/desired), but that changed to UPDATE_NOT_CHECKED after the call to the hook in line 363:

drupal_alter('update_status', $projects);

Searching the code base, found this hook is implemented in sites/all/modules/update_advanced/update_advanced.module:50 by update_advanced_update_status_alter()

If you've got this module, the settings page is /admin/reports/updates/settings; you can instruct it to not warn you about specific modules.

The side effect is that by changing the status to anything other than UPDATE_CURRENT, a module/theme will always be listed in the Update UI (modules/update/update.manager.inc:94), including if the module is "current" really.

| improve this answer | |
  • 1
    Worth filing a bug report. – leymannx Feb 14 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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