This is a new feature request, not a request for help with my underlying issue. Webmaster, please move my request to the appropriate area if I am not in the right place.

My use case is: "modify style.css to affect the theme". When I do this, I sometimes receive a stale style.css file from the server. So do other users. I understand there are cache controls in the administration module. I understand why Drupal caches CSS files. I am aware of the admin_menus non-core package.

However, the requirement to "change this caching option, click this button, download this new module, etc." does not make sense to me. I would like to see a new feature "Drupal theming mode". By this I mean, there should be an administration option implemented as a single checkbox, that when checked, "does all this, plus anything extra, no matter the effect on performance" so that stale style files are not served up, or if they are, document that they are stale. In other words, the software should stat() any CSS files in use, compare to the result of the previous stat(), and when a CSS file is modified, automatically take the appropriate action, not require the user to do anything. It literally makes no sense for Drupal to require the user to do anything for each CSS edit because there is no use case that I can fathom that implies "ignore a modified CSS file", especially if the user has clicked a checkbox that in essence says "I am modifying CSS files". In my particular issue, I have now modified the Drupal source to stat() the CSS file I am having a problem with and write the time and size to a flat file. The PHP gets the correct answers, so it is possible to implement my request.

In addition, because we would be in this mode, the software should somehow, on every HTTP request, add somewhere the information on the CSS files in use (file time and size, not a VCS version). If putting this information on the U/I is not practical (but that is what I would want), then this information could be included in the XHTML source as a comment so the information does not affect the U/I.

One benefit of this feature would be that rather than occasionally (or always) having to do something per CSS edit, a user clicks this box one time, then Drupal automatically takes care of the rest. When theming is complete, the admin clears the checkbox, so no performance impact when Drupal is in its "non-theming" mode. Another benefit of this feature is that new users, like me, have a simple way to do something that is generally required without immediately having to get involved in understanding the Drupal caching model, go to a different page on the U/I, download non-core modules, etc. A third benefit of this feature would be that now both developers and users will have this information and will be able to identify/correct the underlying stale CSS file issue (which I now know exists because of my testing). I think one reason this problem does exist is that there is no good way to collect this information with ad-hoc procedures or changes to the Drupal source (which is what I had to do).

Does this make sense? I monitor my threads so please ask if you have questions. I have invested significant time in the underlying stale CSS issue so I would like to see some good come of my work.

Thanks, Jim A.

Comments

jmasquith’s picture

More information: In looking at other posts on this website, I noticed a recommendation by another that one should enable CSS optimization to avoid some issue with IE. The very first time I did this, I observed that a new CSS file is constructed by Drupal and referenced by the markup (correct) and the produced file contained my old CSS source (incorrect). This could not occur if the incorrect caching occurs in the file system or in Apache. The constructed CSS file is produced by Drupal using a stale CSS cache.

I will file a bug report when I have time. I think my feature request is still relevant even if the underlying issue is addressed.

Jim A.

mdupont’s picture

Version: 6.19 » 6.x-dev
Status: Active » Closed (won't fix)

The Theme Developer module does just that, allowing to rebuild the whole theme stack at each request, and displaying a warning message.