When creating a custom block, the user is prompted for a "block description." The field is not marked as required. Since the description is likely to be redundant to the title, many admins may simply leave the description blank.
In the database "boxes" table, the description is recorded in "info," which is defined as
`info` varchar(128) NOT NULL default '',
In addition, the column is indexed and marked UNIQUE. (Why??)
As a result, omitting the description for more than one block causes an error like so:
user error: Duplicate entry '' for key 3
query: INSERT INTO boxes (title, body, info, format) VALUES ('Test block', 'This is an empty block.
', '', 1) in /(path)/includes/database.mysql.inc on line 66.
Comment | File | Size | Author |
---|---|---|---|
#1 | block_description.patch | 1.39 KB | tostinni |
Comments
Comment #1
tostinni CreditAttribution: tostinni commentedI think the unicity is to help admin find their blocks, but the bug is still there.
In the CVS version, there's 2 little bugs corrected by this patch :
- description field isn't marked as requiered
- when the field isn't unique, an error is displayed, but the wrong text field is set as erronous.
Comment #2
Dries CreditAttribution: Dries commentedCommitted to HEAD.
Comment #3
(not verified) CreditAttribution: commentedComment #4
Uwe Hermann CreditAttribution: Uwe Hermann commented