Steps that produced this bug:
1) At admin/build/theme switched from theme 1 to theme 2: disabled theme 1, checked enable and default on theme 2.
2) Clicked save, saw custom blocks that were enabled in theme 1 active in $left and $right that were not displaying the data from the Block Title field
3) At admin/build/block clicked "configure" on one of the custom blocks that was missing its title
4) Confirmed that the block title text was still in the appropriate field, clicked "save" without making any changes.
5) Confirmed that the saved block's title now appeared in the theme where as the untouched block was still missing its title.
Enabling and making theme 1 default again (while disabling theme 2), and then switching in the same fashion back into theme 2 showed the saved block with title whereas the untouched block still did not have a title. It was as though the title only "registered" after the block was saved in that theme. The title would stick no matter what after it was saved within the theme in use.
It seems to me that when a theme inherits a block configuration it should also inherit the block titles. This was tested and reliably replicated on an install with no contributed modules enabled.
Comment | File | Size | Author |
---|---|---|---|
#17 | system_521668-blocktitlemissing-D6.patch | 1.18 KB | KrisBulman |
#16 | 521668-blocktitlemissing-D6.patch | 1.18 KB | KrisBulman |
#15 | 521668-blocktitle-missing.patch | 1.18 KB | KrisBulman |
#11 | system_521668.patch | 1.38 KB | warmnoise |
#10 | system_initialize_theme_blocks_title-521668-6-dev.patch | 1.42 KB | warmnoise |
Comments
Comment #1
markshust CreditAttribution: markshust commentedi can confirm this error on a variety of third-party templates.
Comment #2
Kevin Danenberg CreditAttribution: Kevin Danenberg commentedI am experiencing this problem with a Drupal 6.12 site when switching between two themes. Both custom themes have the same left and right sidebar regions as per typical Drupal sites. The second theme is a Ninesixty-based subtheme. They both have additional custom regions set in .info, and the second has some new regions, but they both have all the standard regions set.
When I switch from Theme 1 to Theme 2, some blocks display with missing titles, and other blocks disappear entirely.
I have to open each block for editing and save without making changes to restore each block properly. They are already set to the proper regions since the left and right sidebars are common to both themes.
If I then switch back to Theme 1, everything is fine. However, if I switch back to Theme 2, blocks and block titles disappear again, so I'm back at square one.
Comment #3
warmnoise CreditAttribution: warmnoise commentedIt appears this can affect both standard and sub-themes, such as using the zen project.
During the first time that a theme is being enabled (I'm reproducing with 6.16), the theme gets a copy of the default theme's blocks.
See http://api.drupal.org/api/function/system_initialize_theme_blocks/
What is curious is that the INSERT statement does not include the "title" field. There may be a very good reason not to do this, but I'm investigating that. Please let me know if there is an obvious reason not to copy the title.
You can verify if your new block title values were not copied by using some simple SQL:
To get around this limitation, and to allow themers to continue work, I've just overridden system.module in a small module. All we are doing is adding the title update. See attached diff for testing.
You'll have to remove any entries in the block table for this new theme first using the following. You can now watch the system_initialize_theme_blocks() perform the INSERT again.
IMO, if the default theme's block title was blank, that is fine. We will still mirror that in the new theme.
Comment #4
warmnoise CreditAttribution: warmnoise commentedUpdating to needs review. Open to any comments/rambling about the behavior of block titles during system_initialize_theme_blocks().
Comment #6
warmnoise CreditAttribution: warmnoise commentedUpdated patch to 6.x HEAD for QA test.
Comment #7
warmnoise CreditAttribution: warmnoise commentedComment #8
warmnoise CreditAttribution: warmnoise commentedAccidental previous status change. Awaiting new QA results.
Comment #9
thebuckst0p CreditAttribution: thebuckst0p commentedRan into this problem, subscribe.
Comment #10
warmnoise CreditAttribution: warmnoise commentedQA resubmit. Up to HEAD with 6.x-dev.
Comment #11
warmnoise CreditAttribution: warmnoise commentedFor some reason, QA tests keep getting postponed. Possibility that filename with -6 extension for D6 specific HEAD is causing patch to to be queued. Trying again with basic name.
Comment #13
ericpai CreditAttribution: ericpai commentedSubscribing. Same problem.
Comment #14
KrisBulman CreditAttribution: KrisBulman commentedexperiencing the same problem as original poster, noticed it when developing sub themes of zen.
subscribing
Comment #15
KrisBulman CreditAttribution: KrisBulman commentedretry of patch commit (same as above)
Comment #16
KrisBulman CreditAttribution: KrisBulman commented*edit*
please ignore this, patch above was accepted (after being in ignore status for a day)
Comment #17
KrisBulman CreditAttribution: KrisBulman commented*edit*
please ignore this, patch 2 posts above was accepted (after being in ignore status for a day)
Comment #18
Dood59 CreditAttribution: Dood59 commentedproblem resolved on D7 I think
Comment #19
KrisBulman CreditAttribution: KrisBulman commentedno chance of resolving it in D6?
Comment #20
KrisBulman CreditAttribution: KrisBulman commentedcould someone review & test the patch that passed QA testing?
Comment #21
burgs CreditAttribution: burgs commentedThis is definitely a bug, and this patch (#15) seems to fix it nicely. Thanks.
Comment #22
KrisBulman CreditAttribution: KrisBulman commentedare bug fixes still making it into 6.x releases?
Comment #23
xjmPatch looks correct and straightforward.
Comment #24
joachim CreditAttribution: joachim commented> Patch looks correct and straightforward.
I agree. Can we have it committed please?
Comment #25
KrisBulman CreditAttribution: KrisBulman commented#15: 521668-blocktitle-missing.patch queued for re-testing.
Comment #26
KrisBulman CreditAttribution: KrisBulman commentedNot sure why this didn't make it into the 6.25 bugfix release?
Comment #27
joachim CreditAttribution: joachim commented...or 6.26...
Comment #28
KrisBulman CreditAttribution: KrisBulman commented#17: system_521668-blocktitlemissing-D6.patch queued for re-testing.
Comment #29
joachim CreditAttribution: joachim commented#17: system_521668-blocktitlemissing-D6.patch queued for re-testing.
Comment #30
hansfn CreditAttribution: hansfn commentedJust for the record: This patch is still not included in Drupal 6.30 so I guess it never will be.
Comment #32
crystalidea CreditAttribution: crystalidea commentedThe isssue still reproduces in the latest version of drupal 6 (6.35)
The patch #15 does fix it
Comment #33
rooby CreditAttribution: rooby commentedI have seen this problem on Drupal 7 also. I will try a fresh install to confirm.