I think this bug dates back to when there was a separate checkbox for 'enabled' on the blocks page (in 4.6 I think). We eventually decided that being in the "Disabled" region was equivalent to having the box unchecked, so the checkbox was removed entirely.

There's some lingering cruft still from this change, the region for disabled blocks can either be 'left' or an empty string. Since these blocks are not in the left column ever, I think making an empty string represent a disabled block in the database is the correct solution.

To reproduce the inconsistency, fresh install D6. Take a look at your blocks table before visiting admin/build/block. 3 rows exist (login, navigation and powered by drupal). After visting admin/build/block, all the other blocks populate the table with status = 0 and region = 'left'. Don't make any changes and save the form. Now all the columns for disabled blocks are status = 0 and region = ''.

This will make our logic when pulling in blocks simpler, so we won't have to check status to see if a block should be in the disabled region.


catch’s picture

Status: Needs review » Needs work

Looks great to me. system_update_6036 just got committed though so needs a re-roll, but otherwise ought to be RTBC.

quicksketch’s picture

Status: Needs work » Reviewed & tested by the community
1.28 KB

No problem. Here's the re-roll.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks quicksketch.

bjaspan’s picture

Priority: Normal » Critical
Status: Fixed » Needs review
714 bytes

This patch introduces a database schema inconsistency (reported by schema.module). You can't change a table schema with a corresponding update function.

Fix attached.

Gábor Hojtsy’s picture

Status: Needs review » Fixed

Agreed, committed. Thanks!

quicksketch’s picture

Crap. Sorry Barry. I won't make the mistake again.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.