I am using Drupal 4.72, but saw this is 4.7 & 4.71 as well. It seems that after you make all of your changes to the blocks page and have it just the way you want it, they reset.

I did some testing on a clean install and noticed that there is no global block setting, so when you switch the default themes, the settings you created no longer apply and the blocks you just setup disappear. This makes it difficult for users to change their themes.

In my quick test environment, it seems that the settings stay for the theme that is listed - but no other theme inherits those block settings. So in my real environment, I have around 30 blocks that appear on different pages. This would mean I have to make those changes in every theme (around 15) for the blocks to show up ..

On my real server, after making all of the changes to the blocks, and switching themes, they get reset and lose all of their values in the configure screen. I think they also get reset when you add or configure a custom block - but I am not sure.

I could have sworn in 4.6 there was a global setting and it didn't matter what theme you were using.

see http://drupal.org/node/61904

Anyway - I guess this is a bug report and a feature request .. The bug is that they reset themselves and lose all of the settings that were under the configure option and the feature request would be that there is a global setting that applies unless a specific theme were edited.

Thanks in advance
Julie

Comments

Leeteq’s picture

Category: bug » feature

As with Drupal 4.7, block settings are per theme.
I agree that this has some undesireable effects. There should be a way to specify that one want the current (re)configuration being inherited to all (enabled) templates.

Changing this to a feature request.
This adds considerable manual time for admins if we have no way of specifying that a block should apply to all templates (also an "new/future" templates).

Possible workarounds:
a) you can either copy the theme you want as the default for all users to a different folder (still under themes), but call it "all users default theme" or something similar. Then, if you change the blocks for the default theme, and later want to change default theme, let the new theme reside in the folder called "all users default theme", and the blocks settings would apply to new theme. This is due to the fact that Drupal refers to the "current"/actual theme name in the table that stores the block configuration.

b) using some db/sql/phpmyadmin "tricks" , you can simply do a search and replace of the old/new theme name in the block table, to have the existing blocks "link" to a new theme.

Comment to workaround a):
On sites where there are several templates enabled/installed, you could rename the original folder of the default theme so that it becomes clear which theme the "all users default theme" actually is, especially if there are several variants of it as a result of customizations/tests etc. So "Bluemarine" becomes "Bluemarine_basis_for_all_users_default_theme", for example.

dublin drupaller’s picture

having the same problem...plus another problem I just noticed.

When you CONFIGURE a block for a different theme, such as only appear on "front", that doesn't work for the secondary theme (i.e. not the default theme).

I would have thought that when you enabled a block in a different theme, it would inherit the configuration.

would also love to see an option under themes to "use the same blocks for all themes" or under the Block settings page such as "use the same settings as the default theme".

Dub

Carlos Miranda Levy’s picture

Once I configure one custom block to show in what used to be the main theme, I have been unable to get it to display in any other theme.

Tried everything, removed conditions for display, made the other theme the default flushed the cache...
I even removed all contrib modules and nothing and disabled path too.

At first I thought it was because my user was using a theme other than the default. Even changed my personal theme to match the default... Nothing.

I am using mod rewrite (friendly urls) and multi site (I am testing on the main site) 4.7.2.

Any clue?

emackn’s picture

Any resolution to this?

kreaper’s picture

Version: 4.7.2 » 4.7.3

Help! This is the problem with 4.7.3 as well. Previously with 4.6, we had the ability to set the blocks globally and install themes (usually in a themes/contrib) directory. That was a big selling point to my users with Drupal -- I can install themes with little or no effort.

Now - the new "design decision" in 4.7.3 is a show stopper and undoes all the design principles assumed in themes. Stop this over engineering and get the global option back! (please)

kreaper

RyanR’s picture

One possible solution could be to allow the user to "copy" the block layout from another theme. Or have the concept of a block layout template maybe.

Just some ideas. This one has hasn't caused me any serious problems but is anoying since I'd like to offer the ability for my users to change themes but it is just way to painful to have to go into every theme every time a change to the block layout is made.

magico’s picture

Version: 4.7.3 » x.y.z
raintonr’s picture

Version: x.y.z » 4.7.3

Yeah, this is terribly annoying when one has a number of themes to configure.

I like the idea of #6 submitted by RyanR - each theme could have an 'inherit from .....' another. This sounds like an ideal, as one could make all blocks inherit from their default to emulate the old setup, yet it still maintains flexibility for people who want to control blocks on a per-theme basis.

kreaper’s picture

Fortunately, I was able to find out about the block region module, which fixes some of the broken stuff. While it works, one should not need to install contrib modules for such a core feature that used to once work...

magico’s picture

Version: 4.7.3 » x.y.z

@raintonr: unless you think this is a bug, this will stay in HEAD as feature request.
Anyway, I would like to know some status about this in the current HEAD.

hass’s picture

Version: x.y.z » 4.7.x-dev

*argl* this BUG cost me *hours* to find out and makes me more then once frustrated... and i can say for sure i never used any Drupal version before 4.7.3 and i have *many* blocks that looks like created globally - others are not. And this is what took me senseless lifetime.

What is the status? When will we see a fix???

magico’s picture

What is the status? When will we see a fix???

Hmmm... when a nice guy share some of his time to do a patch for this.
It seems you are the right candidate to do that...

magico’s picture

Category: feature » bug

Marking as bug (per hass request) and waiting for a nice guy to do a patch.

cog.rusty’s picture

4.7.3? Is this still an issue in 4.7.5?

webchick’s picture

Version: 4.7.x-dev » 6.x-dev
Category: bug » feature

Yes... It's still an issue in 5.x, even.

Fixing it though will require adding in a 'global' option for blocks, which is too big of a change this close to release.

Marking feature request for 6.x. I agree that this is annoying.

profix898’s picture

Assigned: Unassigned » profix898

Many taxonomy_theme users have asked for specifying block visibility for all themes globally in addition to per-theme settings (since 4.7). I'm working on a patch, so I'm assigning this to myself ... I will comment back in a few days ...

spyderpie’s picture

Wow, I just have to say that I love working with Drupal because of the genuine interest and commitment of the developer and user community. You guys are awesome. If I were a programmer, I would have definitely contributed to this .. but alas ... any programming I would do would just be plain scary .... I'm good at finding bugs though! LOL

Thanks,
Julie

solanas’s picture

Version: 6.x-dev » 4.7.6
Category: feature » bug

I have more problems. I work with drupal 4.7.6 multisite, friendly urls and url alias. I think #3 has a similar configuration.

In one of my sites I have changed twice the default theme. I have more than 20 simplenews blocks which were configured with specific visibility settings to be shown on the listed pages. I’m not sure in which of my previous default themes it was set, I think it was set on my actual default theme but I’m not sure. Every block is working OK and is displayed just on the pages I specified. Today I have tried to change the configuration of some of those blocks and ¡oh surprise!, they has no pages specified on their configuration, but they are working and they are showed just on the specified list of pages they were set.

I can see the block table database with the correct information saved for my theme, but it’s not loaded when I try to alter the configuration of the block so… The configuration block screen is opened with the default settings “Users cannot control whether or not they see this block” and “Show on every page except the listed pages” with a blank list of pages. If I save the block with those default settings my previous settings are lost and the block is showed on all my site.

Any way to solve the problem until a patch was developed?

Could the block region module help me? I would prefer to solve the problem without these module. At the moment I'm not going to change my default theme.

Thanks in advance.

webchick’s picture

Version: 4.7.6 » 6.x-dev
Category: bug » feature

Please don't hijack issues... open a separate support request for your problem. This is a feature request for Drupal 6.x to provide a global block administration interface.

profix898’s picture

Status: Active » Needs review
StatusFileSize
new14.69 KB

The 'global block administration' feature is quite difficult to implement. The main problem is that every theme has different regions. What means you cant simply say 'enable block x for all themes', because you have to select the region for each theme as well. It took some time to find a nice way to bypass this problem.

Here is a first patch which implements the following:

  • it separates the blocks administration into a 'by theme' and a 'by block' view. 'by theme' is what is currently available, it gives you a list of all blocks for a selected theme. 'by block' provides you a list of all themes which the selected block can be enabled for.
  • it provides a select field containing regions common to all themes what makes it easy to enable/disable a block for all themes

The code may need some love (e.g. comments), but it demonstrates what I think simplifies block administration. Please try and comment ...

profix898’s picture

StatusFileSize
new58.48 KB

... and a screenshot ...

profix898’s picture

Title: Blocks get reset when switching themes / no global block setting » provide a 'global' block administration interface
hass’s picture

subscribe

Stefan Nagtegaal’s picture

IMO this is not an improvement at all..
It scares the crap out of me, and it makes the block administration even harder to grok..

Leeteq’s picture

Interesting, will test and contemplate on how this works.
As for the complexity, it is an important possibility to have, but perhaps it should be an option on the admin page to turn this "dimension" on/off. So that admins can choose whether or not to use it.

This feature can probably be made simpler and/or come with suitable explanations on that configure page as well. Will post my thoughts when I have had time to have a closer look.

profix898’s picture

@Stefan: Surely you wont need this feature if you only have one theme enabled. But things look different in case you use several (sub)themes (5 or 10 are not unusual if you want sections of your site to appear different, e.g. different color schema, etc.): Say you have 10 (sub)themes and you just enabled a module which provides additional blocks. You must now go to 10 themes in blocks administration and configure settings for each of the new blocks. This can take some time and is really annoying. With the feature I propose here you go to the 'by block' page, select the new block, configure regions for all your themes at once (+ block specific settings) and thats it.

@DanielTheViking: I dont say this patch is RTBC. For sure there are more comments and descriptions needed to explain the features. I just wanted to share it to get some feedback wheter people find it useful at all or not ...

hass’s picture

i have over 20 themes and feel very stressed if i need to turn on one block in all themes... i hope this feature find the way inside D6.

Stefan Nagtegaal’s picture

@profix898: Offcourse I understand the usecase of this, but I just think this isn't right. NOt sure what would be better though..
To me it makes more sense when every theme has it's own menu item with all theme specific build-options under it.

The way the current block pages are, are already hard enough to understand and mistakes are easily made..
I think this would better fit inside a contrib module, but hey... Who am I?

Stefan

Leeteq’s picture

Because of the complexity, maybe it should be a contributed module first, then consider it for core later when it is working well, and possibly when it is ensured that the chosen solution fits in with the envisioned development ("direction") of the related core modules.

profix898’s picture

If making this a contributed module is the general consensus, I will be happy to do so. Using hook_form_alter it should be possible. But there are two small changes that should go into core in that case:

  1. Change function _block_rehash() {...} to use a $theme parameter (and dont use global $theme_key; instead). Otherwise the contrib module would need to duplicate the whole function except of a few lines ...
  2. It would also help to remove the hardcoded $form_state['redirect'] = ... and use a the usual 'query' => drupal_get_destination() instead.

However I'd like to get more votes and some feedback on how you think the proposed 'by block' administration feels like ...

profix898’s picture

StatusFileSize
new14.69 KB

I have added the proposed changes from #30 into a separate patch (http://drupal.org/node/148531). This allow the 'global' block administration interface to be easily implemented as contributed module. A working contrib version is already on my desktop ;)

However I would still get some more opinions for this feature in core! Re-rolled patch attached.

catch’s picture

Version: 6.x-dev » 7.x-dev
Status: Needs review » Needs work

no longer applies.

casey’s picture

Status: Needs work » Fixed

D7 has a global block administration interface now doesn't it?

Status: Fixed » Closed (fixed)

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