Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When clicking on the button that clears the caches in admin/settings/performance, there are two explicit submits for CSS and JS.
This is not needed, since the #submit for that form called system_clear_cache_submit(), which in turn calls drupal_flush_all_caches(), which has inside it the calls to clear JS and CSS.
So those two need to go.
This way, we save water, and be eco green and all that.
Comment | File | Size | Author |
---|---|---|---|
#12 | fix-performancesettings-submit.patch | 940 bytes | swentel |
no-added-flushing.patch | 636 bytes | kbahey | |
Comments
Comment #1
kbahey CreditAttribution: kbahey commentedComment #3
lilou CreditAttribution: lilou commentedSee: #335122: Test clean HEAD after every commit and http://pastebin.ca/1258476
Comment #4
catchNice find, confirmed that hitting the button continues to clear CSS caches, RTBC.
Comment #5
Dries CreditAttribution: Dries commentedCommitted to DRUPAL-6 and CVS HEAD. Thanks!
Comment #6
Damien Tournoud CreditAttribution: Damien Tournoud commentedPlease revert.
The submit handler for system_performance_settings() is system_settings_form_submit(), so the explicit #submit calls to drupal_clear_css_cache and drupal_clear_js_cache *are* needed.
Comment #7
catchDamz is right - while you can clear those caches by hitting the button, we /also/ need to clear them when saving the form. My fault for RTBC-ing too quickly.
Comment #8
Damien Tournoud CreditAttribution: Damien Tournoud commentedFun! This was released in both 6.7 and 6.8...
Comment #9
Damien Tournoud CreditAttribution: Damien Tournoud commentedBumping to critical, if you change the page compression settings, a mix of compressed and uncompressed pages will be stored in the cache_page table...
Comment #10
Dave ReidYeah that is a bad, bad condition to have. Marking as RTBC since all that is need is a rollback of the patch in the top post.
Comment #11
Dave ReidWait, no we need a new patch to clear the cache if settings are changed, not just when the clear cache button is clicked.
Comment #12
swentel CreditAttribution: swentel commentedSimple patch.
Comment #13
Damien Tournoud CreditAttribution: Damien Tournoud commented@Dave: it has never been the case. Form-level submit handlers are not called when button-level handlers are defined.
This patch tried to fix an issue that doesn't exist.
#12 is RTBC. Please commit on both D7 and D6.
Comment #14
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD and DRUPAL-6. Thanks!
Comment #15
robertDouglass CreditAttribution: robertDouglass commentedDid this get rolled back? Does it need a status update? http://drupal.org/cvs?commit=162924