Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
theme system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 May 2009 at 11:17 UTC
Updated:
5 Sep 2009 at 18:00 UTC
Jump to comment: Most recent file

Comments
Comment #1
yoroy commentedYou'll actually render your site unusable if you choose Stark as your main theme. And choosing a different theme is one of the links offered on the welcome page, so bumping to critical.
Comment #2
Jeff Burnz commentedGetting this for Minnelli also, installing was no problem but thereafter visiting the blocks page content disappears, Garland no problems.
Comment #3
Jeff Burnz commentedSorry, no idea why the priority auto switched back to normal, resetting....
Comment #4
yoroy commentedComment #5
gábor hojtsyUhm, have you installed fresh or just updated HEAD and run update functions? Because this block was introduced in an update function which was added earlier and then modified, if you updated HEAD, you won't get this block.
Comment #6
Jeff Burnz commentedI updated from head, but then as test dropped the db and did a clean install, same problem.
Comment #7
gábor hojtsyOk, reproduced. No blocks are inherited from Garland in D7 when switching themes.
Comment #8
gábor hojtsyComment #9
johnalbinsubscribe
Comment #10
johnalbinBTW, to temporarily fix this issue in your system, run this SQL command:
That will enable the content block and place it in the content region. You'll still need to enable some additional blocks on admin/build/block to get things working right, but that will get you started.
Comment #11
bixed commentedMarked #473108: Empty page when changing the theme as duplicate of this.
Comment #12
chx commentedComment #13
webchickI pictured the block being moved during theme enable. chx pointed out though that something very funny is going on.
D7 seems to be doing "make a tab for every theme in the themes/ directory."
D6 does "make a tab for every theme with its "enabled" checkbox checked."
D7's behaviour is wrong and should be fixed.
Comment #14
webchickCan confirm that the behaviour one would expect, where when you enable a theme and its content region gets populated, appears to be happening. The problem is with D7's access check which is not properly hiding themes it should be. Thus people are going into this page without hitting the themes page first and "hilarity" is ensuing.
Chx has a fix for the access callback. Patch coming up shortly.
Comment #15
chx commentedComment #16
chx commentedComment #17
tic2000 commentedThe patch in #12 works to show the main block.
Regarding #13. D7 also only makes a tab for every enabled theme. The problem is that it comes with no theme enabled and then it displays the tabs for all themes while D6 doesn't.
Even if you do enable the themes, you still need the patch cause no content is shown otherwise when you change the theme, but... the patch works only in the initial case of no themes enabled.
Comment #18
chx commentedThird try...
Comment #19
chx commentedBetter text, comment, no code change. This does not fix the real bug here but nevertheless it's a bug to be fixed.
Comment #20
webchickCommitted #19 with a few more comments since I was killing time waiting for test bot.
So now we've solved yoroy's original bug, which is that tabs are accessible which really ought not to be.
Back to active now for the "real" bug, which is that when you switch your theme you lose your entire page. Fun!
Comment #21
chx commentedComment #22
chx commentedComment #23
webchickWhy?
We no longer do SELECT COUNT queries because they are slow on InnoDB. The new pattern is like:
PHPDoc plz!
In another issue, we should really look at moving this to setUp().
Also, are these tests extensive enough to cover the issue? Should we not check for "content" explicitly?
Comment #24
tstoecklerAs pointed out in #17 it's also a bug that on a clean install of HEAD no themes are enabled. When visiting admin/build/themes you only see the "default" checkbox lingering with Garland but none of the "Enabled" checkboxes are, well, enabled.
Comment #25
webchick@tstoeckler: That is indeed also a bug, but not a critical one that prevents anything from showing up when switching themes. So unless it's shown that the two are directly related, I'd prefer to fix that relatively minor bug in some other issue.
Comment #26
chx commentedMuch more through test. More comments.
Comment #27
tstoecklerCreated: #477800: No themes enabled upon install
Comment #28
webchickAwesome work, chx!! :D
Touched up the comments a bit and committed to HEAD!
Dare I mark this fixed? :)
Comment #29
tic2000 commentedYes, it works now on a fresh install. The "bug" in #17 I think it can be ignored now since it's partially fixed. Now, even if no theme it's enabled, the tabs aren't displayed on block page anymore. If the user enables a theme the default one will be marked as enabled too.
Now we need a review on #477018: Reordering blocks doesn't work as it should cause the block ordering doesn't work properly.
Comment #30
tic2000 commentedups, changed the status by mistake
Comment #31
yoroy commentedAt least now it's possible again to experience D7 in something else than Garland :-) Thanks all.
Comment #32
pasqualleshould not be the _block_themes_access() fix backported to D6?
also similar, wrong access check is used in the system.module
this is also wrong then (code from system.admin.inc)
let's fix the problem everywhere..
Comment #33
pasquallemy concerns are solved in this issue #542828: Do not special case disabled admin theme