Closed (outdated)
Project:
Drupal core
Version:
6.23
Component:
block.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Jul 2008 at 14:47 UTC
Updated:
2 Mar 2016 at 22:18 UTC
Jump to comment: Most recent
If admin has garland (for example) theme, goto /admin/build/block/list/anothetheme, he cannot change settings there!
Look:
function block_admin_display($theme = NULL) {
global $theme_key, $custom_theme;
if ($theme) {
$custom_theme = $theme;
}
else {
$custom_theme = variable_get('theme_default', 'garland');
}
init_theme();
...
$form['#action'] = arg(3) ? url('admin/build/block/list/'. $theme_key) : url('admin/build/block');
$theme_key point to `garland` theme, not `anothetheme` because init_theme() work only once (not in this function) and sets $theme_key to user's default theme!
Comments
Comment #1
damien tournoud commentedOk, setting
#actionhere is probably useless, and the function would be more robust without this.But the behavior you are seeing is probably a bug in one of your modules.
The
init_theme()call in this function is supposed to be the first one. This call will change the current theme, so that the block admin page is displayed in the target theme. This way,$theme_keyreally reflects the target theme (being in fact essentially equal to$theme).Conclusion: you have a module that incorrectly calls init_theme() before block_admin_display() is called.
Comment #2
Lvl-1 commentedYes. I'll try clear drupal install and it works fine. Then i backtrace my install and find that init_theme() call advanced_forum & views modules before block_admin_display(). My AF is alpha-7 and i'll try to install latest. But my views is latest version and i think bug there.
Comment #3
Lvl-1 commentedIt' s OK, with latest advnced_forum() no problem. I must reassign this issue to Views project?
Comment #4
andrenoronha commentedSo the problem is about the views module?
but which version? i'm using views 6.x - 2.3
i tried views 2.5 but i got a white sreen when visiting the front page so i reinstalled views 2.3.
i've just installed views 2.4 with no sucess
and with these errors in the front page (now the page appears, not that white screen):
* warning: require_once(./sites/all/modules/views/includes/handlers.inc) [function.require-once]: failed to open stream: No such file or directory in /home//public_html/sites/all/modules/views/views.module on line 512.
* warning: require_once(./sites/all/modules/views/includes/view.inc) [function.require-once]: failed to open stream: No such file or directory in /home//public_html/sites/all/modules/views/views.module on line 512.
Comment #5
magpoc commentedI have experienced the case when my module call a theme function in hook_init().
Comment #6
webchickThere's no patch here yet.