Closed (fixed)
Project:
Nice Menus
Version:
6.x-1.0-rc1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Jan 2008 at 15:50 UTC
Updated:
4 Feb 2008 at 14:36 UTC
Jump to comment: Most recent file
Comments
Comment #1
add1sun commentedHm, the nice menus CSS and JS is called in the theme function and that is not getting pulled in with the block caching. I've never dealt with block caching so I'll need to investigate. Thanks for reporting.
Comment #2
add1sun commentedUgh, ok so no dynamically adding the JS and CSS in the theme function (grrr.) I've moved that stuff to a hook_init so it should work now, even with caching. Please test and report back.
Comment #3
IcyAndy commentedtested and works on my test site. As some core modules also add their css and js via hook_init I think the solution is ok -> patch ready to commit
Comment #4
add1sun commentedCool, thanks for testing. Committed to 6 branch and HEAD.
Yeah, the motivation to put CSS in the theme function rather than init is so that a) it only gets called when the theme function is called, not on every page (no need to call the CSS if it won't be used on a particular page) and b) it allows themers to monkey with it if they want to without hacking the module. But unfortunately it looks like we have to go the init route for now. :-/ Myself and co-worker are looking at how to improve that in D7.
Comment #5
IcyAndy commentedad a.) makes sense but I guess will be some work
ad b.) That shouldn't be a problem according to the api documentation: A theme should still be able to replace the complete css file (didn't try it myself though) (see http://api.drupal.org/api/function/drupal_add_css/6)
Comment #6
add1sun commentedYep, I guess I am actually more concerned with the hardcoded JS calls that are in the drupal_set_html_head more than the CSS really. Anyway, it was in the menu hook in 5 and that worked fine (I had moved it to the theme in 6 as a best practice - just to get dinged and essentially move it back. ;-))
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.