[support] CSS lost for anonymous users

Domenic Santangelo domenics at gmail.com
Wed Jun 16 06:48:41 UTC 2010


On Jun 15, 2010, at 3:25 PM, Scott wrote:
> Any thoughts on what I should look for?  I've gone ahead and moved the
> module style sheet into the theme directory so all appears okay now but
> I'd like the module to be stand alone as I've submitted it for
> consideration to the drupal community.

Thoughts in the order I'd check (some or all may not apply):

0. Make extra-sure your module's enabled on admin/build/modules

1. Check your drupal_add_css() call. Should look roughly like:
drupal_add_css(drupal_get_path('module', 'MYMODULE') .'/css/MYMODULE.css');

2. Make sure you're doing drupal_add_css() inside hook_init()

3. Test with css aggregation (admin/settings/performance) turned OFF on production and verify that your css appears in the head tag. If it doesn't, sanity check: make sure you're updating production code correctly (a simple comment in page.tpl.php or your main stylesheet works), check the watchdog for obvious errors.

4. Turn aggregation back on, see if css shows up now

5. If not, clear cache (admin/settings/performance)

6. Verify that you don't need to restart memcache/apache/etc, do it if needed

7. Go back to step 0 and try again

Good luck.

-D




More information about the support mailing list