Create a new content type: leave the Body label empty, so the node will not have a body, and in Workflow Settings, choose Create New Revision.
Now, create a new node of this type, and save it. This works fine.
Then, edit the node and save it. Instead of going back to the node page, you will get a Page Not Found error, with the following Drupal error message:
user warning: Field 'body' doesn't have a default value query: INSERT INTO node_revisions (nid, uid, title, teaser, log, timestamp, format) VALUES (4, 1, 'fgdghdhdhgd', '', '', 1225857929, 0)
My guess is that in node_save(), we should replace:
elseif (!empty($node->revision)) {
$node->old_vid = $node->vid;
}
by
elseif (!empty($node->revision)) {
$node->old_vid = $node->vid;
if (!isset($node->teaser)) {
$node->teaser = '';
}
if (!isset($node->body)) {
$node->body = '';
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | node.module.330290.patch | 724 bytes | David Lesieur |
Comments
Comment #1
David Lesieur commentedHere's a patch for this.
Comment #2
damien tournoud commentedMy guess is that this is a duplicate of #261258: Fix node_save() insertion logic.