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

lainwired’s picture

I have also experienced this bug. in 5.x- 1.0- alpha 7.

michelle’s picture

Title: Administration theme....block settings » Block admin page stuck on admin theme
Status: Active » Needs work

I 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

michelle’s picture

Status: Needs work » Fixed

Changed my mind. I've got enough other things to deal with to worry about this. Excluding admin works so calling this good enough.

Michelle

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

ajevans85’s picture

Hi,

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.

michelle’s picture

This is already fixed.

Michelle

rob5408’s picture

Just 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.