Hi All,
Please see 2 attached screenshots.
okay.png shows that there is a +Account roll over linking to other Profile2 pages. okay.png is using the regular Rubik 7.x-4.x-dev (2011-Nov-03).
I made a subtheme that is currently just loading a .css file to overwrite some Rubik styling. Here is my subtheme .info file.
name = Rubik Custom
base theme = rubik
description = Rubik theme with some customization
core = 7.x
version = "7.x-1.0"
engine = phptemplate
stylesheets[all][] = css/styles.css
Here is my stylesheet right now...
p {
color:#333;
}
When using my custom Rubik subtheme I see what is in the attached error.png. No +Account. =/
Thanks for reading,
-Tim
Comments
Comment #1
overtune commentedI'm having the same problem... Is there any solution for this?
Thanks in advance.
Comment #2
zzolo commentedThis is actually true of all secondary tabs when using a sub theme. This is actually caused from a very specific piece of code:
Why is this?
Comment #3
Anonymous (not verified) commentedYou need to reimplement the function in your custom template of your subtheme.
Comment #4
adammaloneThis needs to be implemented within rubik to check if the active theme uses rubik as base:
Comment #5
adammalonepatch attached
Comment #6
star-szrPatch looks good, tested and working.
Edit: spoke too soon, seeing errors:
Notice: Undefined property: stdClass::$base_themes in rubik_preprocess_page() (line 129 of …/rubik/template.php).
Warning: array_key_exists() expects parameter 2 to be array, null given in rubik_preprocess_page() (line 129 of …/rubik/template.php).
Looks like in my subtheme $theme_info actually contains 'base_theme' which is a string, not an array called 'base_themes'.
I just have
base theme = rubikin my .info.Comment #7
adammaloneWhich version of rubik are you using?
Can you do a dpm of $theme_info just after the global is called on line 128 of template.php?
The dpm I get reveals both an array called base_themes ($theme_info->base_themes['rubik']) as well as $theme_info->base_theme
Suppose someone makes a rubik subtheme and someone makes a subtheme of that. $theme_info->base_theme only shows the parent, whereas the array of base themes shows all parents right back to the very base theme which is the safest way of including rubik should the theme created be a subtheme of a subtheme of rubik.
For the record I'm using Rubik 7.x-4.0-beta8
Comment #8
star-szrI did a quick dpm() yesterday and couldn't see a $base_themes array in $theme_info - both in 4.0-beta8 and 4.x-dev.
I'm not sure why we need the
if ($theme === 'rubik') {}and why this got punted to subthemes. Maybe this fixed a bug at some point, but I did a git blame and it looks like the code around this hasn't changed at all since the D7 port. Could have been a workaround for a core bug that has since been fixed, who knows.Comment #9
adammaloneSeems like a case of me not seeing the wood for the trees... I guess I didn't think of just removing the
if ($theme === 'rubik') {}check!Here's a rerolled patch for rubik which doesn't have that check. Since the rubik template.php will only be in effect for rubik and its subthemes I can't envisage an immediate issue.
Comment #10
star-szrI think unless we can get an explanation for why the condition needs to be there it can be safely removed.
I tested with both rubik and my rubik subtheme on the manage display and theme settings pages. Everything works as expected, so RTBC from me. If someone else can test the patch and report their results that would be great.
Comment #11
coffeymachine commentedThis is something that is still around from the old 6.x version from Development Seed. I don't see any reason why that check needs to be there either.
Committed to the 7.x-4.x branch.
Thanks!