Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | block_admin.patch | 588 bytes | jmiccolis |
Comments
Comment #1
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedthis 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.
Comment #2
ChrisKennedy CreditAttribution: ChrisKennedy commentedI tried the behavior reported in the description and it doesn't occur in 5.x
Comment #3
jmiccolis CreditAttribution: jmiccolis commentedIt 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.
Comment #4
gregglesI 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?
Comment #5
Caleb G2 CreditAttribution: Caleb G2 commentedCan not replicate issue on fresh install of 4.7 head. Seems to be fixed.
Comment #6
jmiccolis CreditAttribution: jmiccolis commentedFor me at least this seems to at base have been caused by a contrib module calling a theme function to early. Setting to Closed.
Comment #7
gregglesAnd 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.