UI for block administration across multiple themes is broken.

dopry - September 4, 2006 - 22:07
Project:Drupal
Version:4.7.x-dev
Component:block.module
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

1) enable all of drupal's themes.
2) add a custom block
3) goto admin/blocks, enable the block on all themes.
4) switch theme to another theme and goto the blocks admin page.

the block will not be enabled. You can closely observe what is going on in the blocks table.
SELECT theme, module, delta, status FROM blocks where module='block';

It appears that only the 'current' theme is updated from the blocks administration UI and not the 'selected' theme.

#1

killes@www.drop.org - December 11, 2006 - 21:39
Version:4.7.3» 5.x-dev

this is indeed rather confusing. If I select another theme's block admin screen, I also get to see all the regions defined, not only the ones for the selected theme.

#2

ChrisKennedy - December 12, 2006 - 00:02
Version:5.x-dev» 4.7.x-dev

I tried the behavior reported in the description and it doesn't occur in 5.x

#3

jmiccolis - December 19, 2006 - 17:49
Status:active» needs review

It appears that the problem here is how the $theme_key global is used by _block_rehash();

To me it looks like this could be fixed just by setting the $theme_key global based on the url, so that when _block_rehash is called it knows what theme to work with.

Patch is attached.

AttachmentSizeStatusTest resultOperations
block_admin.patch588 bytesIgnoredNoneNone

#4

greggles - December 21, 2006 - 23:22

I couldn't repeat the problem as described using the Dev version from December 20, 2006 - 20:05 with block.module ID: 1.206.2.7

In step 4 when you say "switch" does that mean "visit admin/themes, make one of the currently enabled themes the default" or does it mean "visit user/uid/edit and change the theme for your user"?

I tried both scenarios but couldn't get repeat the problem.

jmiccolis - I assume you repeated the problem before creating your patch, right?

#5

Caleb G2 - December 26, 2006 - 21:39

Can not replicate issue on fresh install of 4.7 head. Seems to be fixed.

#6

jmiccolis - December 27, 2006 - 23:48
Status:needs review» closed

For me at least this seems to at base have been caused by a contrib module calling a theme function to early. Setting to Closed.

#7

greggles - December 28, 2006 - 00:06

And while I agree we should close this issue, anyone who still has this issue should please continue trying to hunt down what combination of settings/contrib modules causes it.

 
 

Drupal is a registered trademark of Dries Buytaert.