Posted by fred0 on December 14, 2008 at 12:07am
Jump to:
| Project: | Genesis |
| Version: | 6.x-2.0-beta5 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Jeff Burnz |
| Status: | closed (fixed) |
Issue Summary
In beta15, I had placed an advanced_forum.css in my theme directory and it did the overrides just fine. beta16 breaks that for non-forum comments (if enabled) and in the preview/compose mode.
Comments
#1
sorry, meant alpha15 and alpha 16
#2
Could you please provide steps to reproduce this? Based on what you said here, this is what I tried:
As far as I can tell everything is working properly.
Michelle
#3
My steps are exactly the same except I stepped through every line in advanced_forum.css and changed every color definition from blue to pink.
The admin page is set to blue_lagoon so, that is the css file I copied to my theme folder. I'm using the genesis theme builder template to create my theme.
If I add advanced_forum.css to the .info file for my theme, then all the overrides work. However, previously, just by putting advanced_forum.css in the root folder of my theme was enough.
#4
Sounds like there's a conflict with the Genesis theme, then, as this works just fine in Garland. I'm going to move this to his queue to see if he has any ideas. If not, I can try installing Genesis at some point and see if I can figure it out but that's not something I have time for right now.
My best guess is that the problem has something to do with subthemes, which is what Genesis does, IIRC. AF is probably looking in the wrong directory for the CSS.
Michelle
#5
I'll install AF and see what gives, which I've been meaning to test for some time, so now push comes to shove:)
#6
Great, thanks! If it turns out there's something I can do in AF, let me know. You've got a nice suit of themes there so would be good to have AF working with them.
Michelle
#7
I could find no issues nor replicate the issue.
I can place the advanced_forum.csseither in the Base theme directory orin the Subtheme directory, either way it is pulled automatically.Edit: putting it in the base theme directory turns out to be unreliable, but placed in the subtheme directory is working consistantly.
I tried disabling the Genesis base theme (but leave the Subtheme enabled) - no change, everything still works.
Best I can suggest is to clear all the caches/clear cache data and double check you are modifying the right CSS file. Use firebug to determin the path to advanced_forum.css
If you can provide a link perhaps we can see what is going on more clearly.
#8
@jmburnz - Thanks for trying. If you can't repro it, then it's pretty stuck unless the OP can give us more info.
FWIW, this is the relevant code:
$css_file = path_to_theme() . '/' . $filename;D6 core does some weird things with path_to_theme() and it doesn't always point to your theme, so I can see there possibly being a bug here under some circumstances but it's not something I can fix without knowing exactly what is triggering path_to_theme() to be pointing to the wrong place. Even then it's hard to fix because, when it's wrong, there is no function that will give you the correct path. :(
Michelle
#9
Actually, I've just been talking to JohnAlbin on IRC. Try this. Find these lines in advanced_forum.module:
<?php// Try first in the theme directory.
$css_file = path_to_theme() . '/' . $filename;
?>
and change them to:
<?php
// Try first in the theme directory.
global $theme;
if (!empty($theme)) {
// If the global $theme variable is available, get the path from there
// because it is more reliable.
$path_to_theme = drupal_get_path('theme', $theme);
}
else {
$path_to_theme = path_to_theme();
}
$css_file = $path_to_theme . '/' . $filename;
?>
(Don't include the php tags; those are just there to trigger the formatting.)
If that helps, I'll commit it to AF so you don't need to keep hacking it.
Michelle
#10
I see, lets see if this clears it up for the OP, in my system it seems no problem with scope - path_to_theme is always pointing to the active theme, surely drupal_get_path is going to be more reliable though, I was just going down that path myself (excuse the pun...).
#11
I tested Advanced Forum recently in Genesis beta5 and everything was schweet:) Closing, at last.