If you view the release notes / release node for a project, there is no theming applied - it's just an ugly white background. At least on my sites anyway. This is because drupal_add_css() is being called within hook_nodeapi(), which I think causes caching issues.

Instead, drupal_add_css(drupal_get_path('module', 'fserver') . '/fserver.css'); should be placed in hook_init(). Yes, this will add it to every page, causing a minor amount of css 'bloat', but it's the only valid way to add CSS in D6.

If you agree, I can roll a patch for this.

CommentFileSizeAuthor
#6 fserver-1245420-6.patch660 bytesdanepowell
#5 patch-1245420.patch588 bytesjohn bickar

Comments

eugenmayer’s picture

confirming this issue, just the same for me. But iam not very sure about your approach, nodeapi is wrong, but hook_init is even more wrong. Actually preprocess for the template would be the right place .. so theme_alter

danepowell’s picture

Whatever works sounds good to me :)

eugenmayer’s picture

Same here :)

john bickar’s picture

Component: User interface » Code

The code in fserver.css has extra opening curly braces on lines 4 and 5, which is actually what is causing aggregated CSS to break.

Will see if I can provide a patch.

john bickar’s picture

Status: Active » Needs review
StatusFileSize
new588 bytes

Let's try this patch.

danepowell’s picture

StatusFileSize
new660 bytes

Thanks, that was a simple fix! Here's a proper Git-formatted patch.

danepowell’s picture

Status: Needs review » Reviewed & tested by the community
eugenmayer’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

thanks guys, very helpful!

eugenmayer’s picture

Version: 6.x-1.1 » 7.x-1.x-dev
Assigned: Unassigned » randallknutson
Status: Patch (to be ported) » Needs work

applied in ada518a for 6.x-1.2

moving to 7.x

eugenmayer’s picture

Status: Needs work » Postponed

for now, postponing all all D7 issues, as the branch seems unmaintained by the initial author. PLease suggest using D6 rather for now