Closed (fixed)
Project:
Drupal core
Component:
node.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Sep 2005 at 15:10 UTC
Updated:
11 Oct 2005 at 15:21 UTC
Jump to comment: Most recent file
affects bog, book, forum, page, story modules.
The title is being validated before there's any data to validate resulting in a You have to specify a title. error being displayed before you've had a chance to enter a title.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | node-title-validation.patch | 732 bytes | nedjo |
Comments
Comment #1
chx commentedBest would be to separate validation to 'prepare' and 'validate'. Obviously, on 'prepare' we do not need to do validation.
Comment #2
nedjoSince
node_form()validates with every call, we tend to enclose field validation in aif (isset($node->fieldname))test, so that it only validates if the node form has been previously submitted.In the recently applied node title patch, this test was omitted from validation of the title field in
node_validate_title(). The simple fix, attached, is to reinstate the test.(I agree, though, that in the longer term, the suggested 'prepare' and 'validate' distinction is a good idea. For the most part, there's nothing to validate before we have user input.)
Comment #3
dries commentedWhy do we attempt to validate a node before there has been a POST-operation?
Comment #4
chx commentedBecause we do not have a prepare nodeapi op and some fields are presented dfferently for editing than they are stored / viewed.
Comment #5
m3avrck commentedThis has to be the most annoying bug I encounter on a daily basis, +1 to getting this fixed. Not sure if this is the best route (not super up-to-speed with the inner workings of Drupal in this manner) but checking to see if isset() sounds like a good place to start.
Comment #6
dries commentedCommitted to HEAD. Thanks.
Comment #7
(not verified) commented