Closed (fixed)
Project:
OG Panels
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Oct 2009 at 20:53 UTC
Updated:
13 Apr 2010 at 03:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
foxtrotcharlie commentedI've done a bit of debugging, and it appears that in og.module line 472 there's a function: og_determine_context and this is where it get's the group context (and theme) from - if no context is returned from this function, then there's no og theme applied to that panel page. If I add in another elseif after the last one, at line 497, like so:
This supplies the correct group context. So, I'm not sure if this is an og_panels issue - and og_panels is supposed to supply the correct information when menu_get_object(); is called at the beginning of this function, or if it's an og issue, and something like the above code needs to be added to og.module.
I'm happy to create a patch if someone can verify where the problem lies, and if my way of solving it is acceptable...
Comment #2
jide commentedDid you try to use the og_set_group_context($group_node) function from og_panels instead ?
This function sets the context to a group node so if there is a lack of context somewhere, call this function.
Comment #3
pekman commentedSorry I'm new to all of this and I have this problem. I managed to set up panels with tabs in a group. Everything is as expected on the home page (themes with group theme). But when I click on one of the tabs, the theme changes to the default site theme (I want different themes for site and group). As I said, the group homepage is ok with the groups theme set for the panel. But the tabs don't follow this. What am I doing wrong?
Comment #4
foxtrotcharlie commentedHey Julien - From what I can tell, og_panels does call og_set_group_context in the function og_panels_page line 481, which is the funciton that displays the og panel page.
Comment #5
pekman commentedThanks foxtrotcharlie - your solution worked for me!
Comment #6
isopharius commentedyes very good, now only problem is the og forum tab but that's another matter
any luck on implementing this fix in og_panels instead of og itself?
Comment #7
ultimikeI'm having the same issue with og_panels.
foxtrotcharlie: thanks for the work-around. Too bad it involves hacking OG. It definitely seems like OG Panels is setting the context correctly, but it isn't having any effect on the theming. I've played around with the code for a few hours, but haven't been able to make any progress.
Let's hope the module maintainers carve out a few minutes to jump in and lend a hand...
-mike
Comment #8
jimthunderbird commentedThis can be fixed by adding hook_init to the og_panels module
Comment #9
jimthunderbird commentedOr we can add the following code
in function og_panels_page
Comment #10
isopharius commented#9 works
replaced line 481 in og_panels.module, everything fine, thanks for the fix!
Comment #11
ultimikeHmmmm - #9 didn't work for me, but #8 did...
-mike
Comment #12
jimthunderbird commentedHi mike,
I first come up with the hook_init idea and then found if the same code placed in og_panels_page function, it will also work. But my environment has just basic modules like og, views, og_panels installed, it might be the case where you have other modules install and then modify the title after og_panels, thus, i think hook_init might be a safer fix since it will be called in the beginning.
Best Regards,
jim
Comment #13
ginc commentedpatch implementing solution #8 credit to jimthunderbird
Comment #14
ginc commentedinteresting... the #13 patch fixed similar issue with og_forum tab #339969: Set og theme in og forums
Comment #15
populist commentedcleaned it up a bit and commited.