The following occured when editing stories and nodes:

1. I edited story/page node, creating a revision and entering a log message
2. When I re-edited the same node, the previously entered log message appered in the log message edit area.

In other words: the previous log message is shown by default when editing a story/page.

Problem:

This seems to go against the nature of logs, espeically considering that revisions are optional at each edit. Also, the user might not know that there is a relationship between saving a revision and the ability to record a log message. It is possible to not select the revision check-box and enter a log message.

Related bug/patch

test system:
- drupal cvs
- postgresql 8.0
- firefox

Comments

greggles’s picture

Category: bug » feature

I did a test to try to repeat/understand this bug. Each of the log messages was saved with the new revisions and yes, when I "edit" the node then I get the log message which I can also edit. I see two separate possible ways to handle this:

1. Make log messages new revisions every time, so that when you create/edit a node new log messages are created with every save of the file and the log message area is blank when the edit screen is presented to the user. This is more like how Wikis handle revisions.

2. Leave the behavior as it currently is and add a note in the documentation about the behavior. It makes sense to me how it currently works, but it's clearly not always obvious how it should work - especially for someone coming to Drupal with a background knowledge of Wiki systems or CVS style "messages" on each "commit"/"edit" of a file.

In my opinion, it is useful to have the old log message appear when editing the node and creating a new revision. So, my preference is for solution 2 if any action is taken.

Also, since the system currently "works as designed" I changed this to a feature request since it is not a bug based upon my understanding.

smk-ka’s picture

I'd like give my vote for a change of this behavior, as I just stumbeled upon it while playing around with the revision system. When you "revert" to a specific revision, you actually create a copy of it, with a log message automatically applied. Further (manual) edititing of the node (without explicitly taking care of the log message) leads to a revision log like so:

1 Mai 2006 - 09:54 by admin
Copy of the revision from 1 Mai, 2006 - 05:36.

1 Mai 2006 - 08:59 by admin
Copy of the revision from 1 Mai, 2006 - 05:36.

1 Mai 2006 - 08:57 by admin
Copy of the revision from 1 Mai, 2006 - 05:36.
...

although only one (rather old) revision was ever copied (ie. reverted), so the current behavior is IMO quite misleading.

greggles’s picture

smk-ka - what is the desired behavior in your opinion? Is it one of the two scenarios that I laid out or yet another further change?

For future issue comments, stating that the behavior is not how you expected and is misleading does not help people know how it should behave. Stating the steps to repeat (which you did do) and then the actual behavior (which you did) and then the expected behavior (which you omitted) makes it clear what is being discussed and how to implement it.

Thanks!

smk-ka’s picture

With the "spammed" log in mind, I'd vote for (1) make log messages a one-time thingy and do not replicate them.

smk-ka’s picture

Ok, this only holds true for when revisions are enabled. So what I'd really like to see is a mixture of your proposals: one-time log messages with revisions, and a persistent log without.

dww’s picture

Version: x.y.z » 4.7.3
Assigned: Unassigned » dww
Category: feature » bug
Status: Active » Needs review
StatusFileSize
new1.72 KB

this is *definitely* brain-dead behavior, and a bug. the logs are saved uniquely with each revision. it makes *NO SENSE* to have a default message of the previous log entry as the starting-point (or worse yet, simple duplicate) of the next entry. the logs are being stored per revision already. it's just dumb to pre-fill the last message in the "log message" text field. this has been recently reported in http://drupal.org/node/77630, too.

here's a patch that applies cleanly against DRUPAL-4-7. i'll roll something separately for HEAD, since page.module seems to be gone. ;)

dww’s picture

StatusFileSize
new977 bytes

here's a patch for HEAD. alas, the "pave the way for CCK" also wiped out the log message field on page nodes (story lost the log message field in 4.7, during the conversion to FAPI). :( so, this patch is basically just the 2 line diff against book.module from the other patch, but relative to the new location of book.module.

hopefully we can restore the log message field (or better yet, fix it completely via http://drupal.org/node/53012 such that you *always* see a log message field if you've checked the "create new revision" box, since the log message itself is in the {node_revisions} table, and any node that can have revisions can/should have access to a log message...

dww’s picture

Version: 4.7.3 » x.y.z
Status: Needs review » Reviewed & tested by the community

killes reviewed and is happy to commit to 4.7 once this is committed to HEAD. once #7 is applied, please set this back to version 4.7.3 so #6 can go in. thanks!

drumm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD.

dww’s picture

Version: x.y.z » 4.7.3
Status: Fixed » Reviewed & tested by the community

thanks drumm. #6 is now RTBC for DRUPAL-4-7.

killes@www.drop.org’s picture

Status: Reviewed & tested by the community » Fixed

committed.

dww’s picture

i was going to re-roll this for 4-6, but after looking closely, i think that would be a very bad idea. in 4.6, there's no {node_revisions} table (obviously), and so the log message (which only exists on book nodes, in fact) is only a single field in the {book} table, shared by all revisions of the page. therefore, the existing behavior is right (sic) given the lameness of the older schema regarding revisions. ;) the log is just a giant dumping ground to keep track of all changes, with no way to associate the text to specific revisions. at least it's all better in 4.7. ;) and, at least that explains where the previous 4.7/HEAD behavior came from. no one noticed this UI problem in the conversion to {node_revisions}.

Anonymous’s picture

Status: Fixed » Closed (fixed)