Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
block.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Mar 2009 at 17:17 UTC
Updated:
16 Mar 2009 at 16:52 UTC
Identified at UB Usability Testing: http://www.drupalusability.org/node/130
A user created a block, but did not enter a title or body so they could just see what it would look like. However with both values empty, the block is never actually shown even if it is enabled.
This patch adds validation to check if both title and body are empty, and returns a form error with the text "A block cannot be empty. Please enter either a title or body content."
| Comment | File | Size | Author |
|---|---|---|---|
| block.admin_.inc_.patch | 1014 bytes | chrisshattuck |
Comments
Comment #1
mr.baileysMakes sense, I can't think of any valid reason why one would have a custom block without title and body.
Reviewed the patch and my only concern is the wording (note that English is not my native language, so I can be wrong here): to me, saying "Please enter either a title or body content" implies that you have to enter a title or body content, but not both.
Comment #2
mr.baileysRelated to #401214: Custom block body field should be required, it might make sense to merge these 2 issues.
Comment #3
xanoMarking this as a duplicate of #401214: Custom block body field should be required, as that patch is better (less extra code, code makes more sense and titles don't need to be required)
Comment #4
chrisshattuck commentedConceded, the other patch makes more sense (why didn't I think of that? ;) )