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.

Files: 
CommentFileSizeAuthor
#17 system_521668-blocktitlemissing-D6.patch1.18 KBKrisBulman
PASSED: [[SimpleTest]]: [MySQL] 190 pass(es).
[ View ]
#16 521668-blocktitlemissing-D6.patch1.18 KBKrisBulman
PASSED: [[SimpleTest]]: [MySQL] 190 pass(es).
[ View ]
#15 521668-blocktitle-missing.patch1.18 KBKrisBulman
PASSED: [[SimpleTest]]: [MySQL] 190 pass(es).
[ View ]
#11 system_521668.patch1.38 KBwarmnoise
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch system_521668.patch.
[ View ]
#10 system_initialize_theme_blocks_title-521668-6-dev.patch1.42 KBwarmnoise
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch system_initialize_theme_blocks_title-521668-6-dev.patch.
[ View ]
#6 system_initialize_theme_blocks_title-521668-6.patch1.35 KBwarmnoise
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch system_initialize_theme_blocks_title-521668-6.patch.
[ View ]
#3 system_initialize_theme_blocks-title.diff1.08 KBwarmnoise
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch system_initialize_theme_blocks-title.diff.
[ View ]

Comments

i can confirm this error on a variety of third-party templates.

I 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.

Version:6.13» 6.16
Component:block.module» system.module
StatusFileSize
new1.08 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch system_initialize_theme_blocks-title.diff.
[ View ]

It 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:

SELECT bid, module, delta, theme,title from {blocks} where theme = 'your_new_theme_systemname';

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.

DELETE from {blocks} where theme = 'your_new_theme_systemname';

IMO, if the default theme's block title was blank, that is fine. We will still mirror that in the new theme.

Status:Active» Needs review

Updating to needs review. Open to any comments/rambling about the behavior of block titles during system_initialize_theme_blocks().

Status:Needs review» Needs work

The last submitted patch, system_initialize_theme_blocks-title.diff, failed testing.

Version:6.16» 6.x-dev
Status:Needs work» Needs review
StatusFileSize
new1.35 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch system_initialize_theme_blocks_title-521668-6.patch.
[ View ]

Updated patch to 6.x HEAD for QA test.

Status:Needs review» Needs work

Status:Needs work» Needs review

Accidental previous status change. Awaiting new QA results.

Ran into this problem, subscribe.

StatusFileSize
new1.42 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch system_initialize_theme_blocks_title-521668-6-dev.patch.
[ View ]

QA resubmit. Up to HEAD with 6.x-dev.

StatusFileSize
new1.38 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch system_521668.patch.
[ View ]

For 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.

Status:Needs review» Needs work

The last submitted patch, system_521668.patch, failed testing.

Version:6.x-dev» 6.19

Subscribing. Same problem.

experiencing the same problem as original poster, noticed it when developing sub themes of zen.

subscribing

Version:6.19» 6.x-dev
StatusFileSize
new1.18 KB
PASSED: [[SimpleTest]]: [MySQL] 190 pass(es).
[ View ]

retry of patch commit (same as above)

Status:Needs work» Patch (to be ported)
StatusFileSize
new1.18 KB
PASSED: [[SimpleTest]]: [MySQL] 190 pass(es).
[ View ]

*edit*

please ignore this, patch above was accepted (after being in ignore status for a day)

Status:Patch (to be ported)» Needs review
StatusFileSize
new1.18 KB
PASSED: [[SimpleTest]]: [MySQL] 190 pass(es).
[ View ]

*edit*

please ignore this, patch 2 posts above was accepted (after being in ignore status for a day)

problem resolved on D7 I think

no chance of resolving it in D6?

could someone review & test the patch that passed QA testing?

Status:Needs review» Reviewed & tested by the community

This is definitely a bug, and this patch (#15) seems to fix it nicely. Thanks.

are bug fixes still making it into 6.x releases?

Patch looks correct and straightforward.

> Patch looks correct and straightforward.

I agree. Can we have it committed please?

#15: 521668-blocktitle-missing.patch queued for re-testing.

Not sure why this didn't make it into the 6.25 bugfix release?

...or 6.26...

Just for the record: This patch is still not included in Drupal 6.30 so I guess it never will be.