"Log message" doesn't display on node preview page
SeanBannister - April 4, 2008 - 15:57
| Project: | Drupal |
| Version: | 6.3 |
| Component: | node system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (code needs review) |
Description
When a user creates a node and they enter a "Log message" an select "preview" the "log" variable is posted to the preview page however it isn't diplayed in the field. Therefore if they then post this new node it no longe has this "log message".
I haven't had time to look at the code but it's on my list once I get time.

#1
Got exactly the same problem with 6.2 and 6.3 (actually I found it in 6.2 and I hoped it got fixed in 6.3... seems its isn't). Here's the patch to fix the bug. (it's just one line...)
--- modules/node/node.pages.inc 2008-07-11 21:03:52.000000000 +0700+++ modules/node/node.pages-log-disappear-when-previewing.inc 2008-07-11 20:59:52.000000000 +0700
@@ -160,6 +160,7 @@ function node_form(&$form_state, $node)
'#type' => 'textarea',
'#title' => t('Log message'),
'#rows' => 2,
+ '#default_value' => $node->log ? $node->log : '',
'#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.'),
);
}
#2
The last patch has a problem - if a node is edited for the first time, the log message is set from the latest revision. I don't know if this is what drupal wants - anyway, with this new patch the log message is reset when we're not doing preview. Please decide which behavior is more appropriate for drupal...