Download & Extend

Advanced Forum CSS overriding not working in Genesis theme

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

Category:bug report» support request
Status:active» postponed (maintainer needs more info)

Could you please provide steps to reproduce this? Based on what you said here, this is what I tried:

  1. Copied advanced_forum.css to my theme.
  2. Changed the background color of the author pane in this copy in my theme.
  3. Added a comment to a non forum node. Color changed as expected.
  4. Previewed a comment. Color changed as expected.

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

Title:beta16 breaks css override for comments and preview» Advanced Forum CSS overriding not working in Genesis theme
Project:Advanced Forum» Genesis
Version:6.x-1.0-alpha16» 6.x-1.2
Component:Styles» Miscellaneous
Status:postponed (maintainer needs more info)» active

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

Assigned to:Anonymous» Jeff Burnz

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.css either in the Base theme directory or in 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

Status:active» postponed (maintainer needs more info)

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

Version:6.x-1.2» 6.x-2.0-beta5
Status:postponed (maintainer needs more info)» closed (fixed)

I tested Advanced Forum recently in Genesis beta5 and everything was schweet:) Closing, at last.

nobody click here