Problem/Motivation
In cases where a module is installed but has no releases, update status treats the absence of releases as a failure to retrieve information, and doesn't save it as a completed check, which re-queues it for the next check. It's possible that this problem is also the source of the bug described in
#1352102: pm-update unusable, hangs, loops β
.
Proposed resolution
When checking for releases it has been proposed to replace
if (empty($available[$key]['releases']))
with
if (!isset($available[$key]['releases']))
However in comment #27 bfroehle notes that because of the way the XML is parsed the two checks may not produce a different result.
Remaining tasks
In comment #30 NROTC_Webmaster lists steps to reproduce the issue and states that the patch, based on the proposed solution does not work. Additional testing to verify the failure of the patch would be useful, but it seems that a new approach to solve the issue is required.
User interface changes
It might be easier to identify this issue if the Update page was more explicit in list pages where the most recent attempt to retrieve released failed.
API changes
It may be necessary to parse the XML in a different way, or possibly use a different method for handling actual failures to retrieve version data.
Related Issues
Possibly
#1352102: pm-update unusable, hangs, loops β
Original report by dww
I'm not yet sure how far reaching this bug is, and all the possible conditions that can trigger it. However, it seems likely that it's going to create pretty major trouble for certain sites if we don't fix it... Here's the way I found it:
If you have a module on your site that doesn't actually have any releases, Update status correctly tells you it failed to fetch info about releases of that project. However, due to something about how
#597484: Use the Queue API to fetch available update data β
is working, it appears that the queue item is never drained (or it's always re-added as soon as it failed). So, every time you reload the available updates report, it tries to fetch release data for this project again. The "Last checked for updates" is always "0 seconds", b/c it happens again every time you visit the page. :(
Granted, projects you deploy from CVS without any releases at all are pretty rare, but I have a sinking suspicion the underlying bug could be triggered by other conditions, too.
And, if you turn on the feature that has update status check status on disabled modules and themes, all you need is a *copy* of a module like this anywhere in your sites directory to hit it. For example, check out a copy of
drupalorg β
from CVS into a sites directory and turn on the "check for disabled stuff" checkbox and you'll see the bug. Doesn't even have to pretend to be compatible with D7. :(
So, we need tests for this bug, and we need to go through the code paths for all the queue + fetch logic to make this sane.