Closed (fixed)
Project:
Update Status
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
7 Jun 2007 at 00:00 UTC
Updated:
4 Jul 2007 at 23:46 UTC
Jump to comment: Most recent file
i just noticed that update_status doesn't gracefully handle the case of when you enable/disable modules on your site. for example:
1) fresh install
2) visit admin/logs/updates
3) enable some contribs
4) revisit admin/logs/updates
at step #4, none of your newly enabled modules are displayed at all, not even an entry saying something like "this module is now enabled, but no update status data has been fetched for it yet...".
perhaps the best thing would be to just clear the cache entry for the update_status data whenever we save the admin/build/modules form to ensure that when we land back on the status report page, we have re-fetch.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | update_status_conditional_refresh.patch.txt | 4.15 KB | dww |
Comments
Comment #1
merlinofchaos commentedI agree. It's a simple hook_form_alter to do this, as well. Could probably cut&paste the one from latest Views.
Comment #2
dwwit wasn't quite cut+paste from views. views_form_alter() immediately invalides the views cache when you hit the form at all, we only want to invalidate on form submission.
I committed a fix to HEAD: http://drupal.org/cvs?commit=69774
Please re-open (preferably with a patch) if anyone objects to my change.
thanks,
-derek
Comment #3
dwwUpon further testing and consideration, this patch (in combination with other changes like automatically re-fetching when the cache is empty) has created a critical bug in update_status: every time any Drupal site anywhere submits their modules page, we re-fetch all the XML release history files from drupal.org. :(
Here's what happens:
EVIL!!! :(
Once again, there are a few options for breaking this chain of doom:
I think I prefer (1) from this list, but I'm open to other suggestions...
Comment #4
merlinofchaos commentedI'm cool with #1
Comment #5
dwwattached patch cleans up the code in the following ways:
Currently, *no* call-sites are invoking update_status_get_available() with $refresh=TRUE. So, once you save your modules page or clear your cache, you get the nice message about no data, and you have to manually check if you want to, even when you land on the status report page. it's trivial to change this if we want, e.g. the status report to always attempt to refresh when you land there, but I kind of like the explicit nature of how things behave now.
Other than that, I'm very happy with how things look and behave now. It's quite slick, IMHO, and at least it's no longer re-fetching and hitting d.o whenever anyone saves their modules page. ;)
Comment #6
dwwAfter discussion in IRC w/ merlin, I agreed to automatically refresh the cache on the status report and settings pages. With that minor change, committed the patch to HEAD.
Setting the status back to match the original issue for posterity.
Comment #7
(not verified) commented