Closed (fixed)
Project:
Advanced Forum
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Mar 2008 at 11:26 UTC
Updated:
27 Feb 2009 at 14:33 UTC
I have noticed a bug when using Advanced Forum.
If you set a theme for the admin section using the 'Administration theme' option, when you go to edit blocks it only loads the blocks for the administration theme, if you click on the separate themes to edit their blocks it still loads the default admin theme block list.
I have tracked this down and the error lies with the following code:
function advanced_forum_get_forum_theme_directory() {
//TODO: Add a settings page for this
return 'advforum';
}
My work around to fix the issue is this:
function advanced_forum_menu($may_cache) {
$items = array();
if ($may_cache) {
global $user;
$items[] = array(
'path' => "forum/markasread",
'title' => 'Helper page to mark forums read.',
'callback' => 'advanced_forum_markasread',
'access' => user_access('access content') && $user->uid,
'type' => MENU_CALLBACK,
);
} else {
if(arg(0) != 'admin') advanced_forum_add_css();
}
return $items;
}
I'm not quite sure if the best solution, but it works for me. If I used the below everything works except when viewing a forum post so using != 'admin' seemed the easiest work around.
if(arg(0) = 'forum') advanced_forum_add_css();
Comments
Comment #1
lainwired commentedI have also experienced this bug. in 5.x- 1.0- alpha 7.
Comment #2
michelleI committed a slightly modified version of this so it just excludes the admin/build/block/* pages. But this is just a band-aid and I have no idea what the real issue is here. So I'm leaving this issue open until I can find a proper fix.
Thanks for the fix. I don't use an admin theme so never noticed this problem.
Michelle
Comment #3
michelleChanged my mind. I've got enough other things to deal with to worry about this. Excluding admin works so calling this good enough.
Michelle
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #5
ajevans85 commentedHi,
Just updated to Ver:5.x-1.0-alpha12 .
Your fix preventing forum theming loading for everything under ../../block/* works but when logged in as admin I get alot of 404 errors in the logs as it attempts to load the forum theme from the admin template dir... which of course doesn't exist .... 'themes/garland/naked/advanced_forum-structure.css' .
Simple solution would be for me to copy naked theme to garland (which i use as the admin template). Looking, under admin/* their is absolutely no need to load the advanced forum css / js so it is just a additional overhead becausethe files are not used. I've gone back to my original patch because of this.
I know i am being picky here, your fix works but I don't see what harm would happen stopping the adv theming kicking in under admin/* completely.
Comment #6
michelleThis is already fixed.
Michelle
Comment #7
rob5408 commentedJust as a note for users of the Drupal 6 version, an early 6.x beta had the same bug but has since been fixed in the rc versions.