Clearing cache does not immediately reload theme's .info file

Steve Dondley - March 28, 2008 - 22:46
Project:Drupal
Version:6.x-dev
Component:theme system
Category:bug report
Priority:normal
Assigned:Steve Dondley
Status:closed
Description

To duplicate:

1) Open the current theme's .info file
2) Modify the stylesheets[all][] line and change the style.css file read a non-existent file (nostyle.css)
3) Empty the cache on the Performance page
4) Notice the theme does not change
5) Click around through various pages on the site. Some pages will finally cause the new .info file to load (apparently triggered by something in the menu system forcing a cache reload) and the site will go themeless.

This patch places a call system_theme_data in the drupal_flush_all_caches() function to make force the data in the system table which holds the .info file to reload immediately.

AttachmentSize
theme_reload.patch346 bytes

#1

dvessel - March 29, 2008 - 04:56
Status:patch (code needs review)» patch (reviewed & tested by the community)

Emptying the cache actually shows the changes on the next page load. This is definitely confusing especially with the devel theming modules clear cache link which requires more than one page refreshes.

#2

Dries - March 31, 2008 - 18:17

I've committed this to CVS HEAD. Should probably also go in DRUPAL-6.

#3

webchick - April 8, 2008 - 23:48
Version:6.1» 6.x-dev

Just confirmed this bug again in 6. Changing version to hopefully get some eyes on it.

#4

JohnAlbin - April 18, 2008 - 21:29

I confirm that this problem still exists in DRUPAL-6.

I also tested the patch and it works great, especially with devel's “Empty cache” link. Would mark it RTBC if it wasn’t already.

Nice fix, Steve!

#5

forngren - May 4, 2008 - 20:20

Tested with 6.2 and confirmed working.

#6

Dries - May 5, 2008 - 21:41
Status:patch (reviewed & tested by the community)» fixed

Committed the patch to DRUPAL-6 as well.

#7

Anonymous (not verified) - May 19, 2008 - 21:41
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.