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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kbahey’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

lilou’s picture

Status: Needs work » Needs review
catch’s picture

Status: Needs review » Reviewed & tested by the community

Nice find, confirmed that hitting the button continues to clear CSS caches, RTBC.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to DRUPAL-6 and CVS HEAD. Thanks!

Damien Tournoud’s picture

Status: Fixed » Active

Please 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.

catch’s picture

Damz 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.

Damien Tournoud’s picture

Fun! This was released in both 6.7 and 6.8...

Damien Tournoud’s picture

Priority: Normal » Critical

Bumping to critical, if you change the page compression settings, a mix of compressed and uncompressed pages will be stored in the cache_page table...

Dave Reid’s picture

Status: Active » Reviewed & tested by the community

Yeah 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.

Dave Reid’s picture

Status: Reviewed & tested by the community » Active

Wait, no we need a new patch to clear the cache if settings are changed, not just when the clear cache button is clicked.

swentel’s picture

Status: Active » Needs review
FileSize
940 bytes

Simple patch.

Damien Tournoud’s picture

Status: Needs review » Reviewed & tested by the community

@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.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD and DRUPAL-6. Thanks!

robertDouglass’s picture

Did this get rolled back? Does it need a status update? http://drupal.org/cvs?commit=162924

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.