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

Damien Tournoud’s picture

Status: Active » Closed (works as designed)

Ok, setting #action here 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_key really 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.

Lvl-1’s picture

Title: Can't change block settings from admin with anothe theme » Can't change block settings from admin with another theme

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

Lvl-1’s picture

It' s OK, with latest advnced_forum() no problem. I must reassign this issue to Views project?

andrenoronha’s picture

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

magpoc’s picture

Version: 5.9 » 6.23
Category: bug » task
Status: Closed (works as designed) » Reviewed & tested by the community

I have experienced the case when my module call a theme function in hook_init().

webchick’s picture

Status: Reviewed & tested by the community » Active

There's no patch here yet.

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.