One of the options on the node edit screen is "Create new revision." If left unchecked, the edit will overwrite the current revision, erasing it forever. If checked, the edit will not overwrite the current revision and instead be saved in a new revision. I propose that we eliminate that option and always create a new revision.

From a user interface point of view, this option is confusing. If you haven't read the docs carefully, it's not clear what this option does. Improper use can result in data loss. (See http://drupal.org/node/view/10168)

From a technical point of view, once the revisions table patch (See http://drupal.org/node/view/7582) is finished and integrated, there's no longer a technical reason not to create a new revision every time.

The only reason I can see that someone would want this option would be to hide old versions of a node from users. This can be accomplished without "Create new revision." by simply deleting revisions that you don't with to be seen.

CommentFileSizeAuthor
#10 node.module_14.patch927 bytesmarkstos

Comments

jhriggs’s picture

-1

I never use revisions. I don't want them. Personally, I would like to see an option to completely disable them.

I _would_ like to see them move to a separate table rather than being serialized, but forcing the use of revisions is a bad idea IMO. I don't want my DB to be growing that much every time I change a node, and I don't want to have to delete a revision every time I update content.

Jerk Face’s picture

What you say is true. For a site edited by one or a few people, revisions don't make sense and only waste disk space.

Let's revise the original proposal. Instead of disabling the "Create new revision" option completely, let's make it a global option. That way, regular users don't have to deal with it, people who like revisions can get them all of the time, and people who don't like revisions can get rid of them completely.

eafarris’s picture

Instead of making it an all-or-nothing global option, let's allow the site admin to turn it on or off as a permission. On a site of some complexity, there will be situations where node versioning is highly desired, and other places within the same site where it's not at all necessary. The site admin can already set up defaults for different node types, so that, for example, forums and blogs don't create revisions by default but books do. We could extend this one step further by having a node-level permission called "override versioning" or similar that would let users see the checkbox on their node edit page or not. I think most people either use versions all the time or don't use versions at all. It's darn-near mandatory for certain content types, and almost irrelevant for others. So i think a good compromise is to have the site admin set up administer->content->settings properly then turn off the "confusing" revisions checkbox for most users via a permission.

Jerk Face’s picture

I think the idea that revisions are a per-node-type option is right on. People expect a book page to have revisions, but they don't expect a forum to have revisions. Instead of having a global option or a per-node option, we should always use the default for a particular node type. This should make everyone happy because people who want revisions everywhere can turn them on everywhere, people who don't want them anywhere can turn them off everywhere, and people who want them some places but not others can do that too.

I don't like the idea of having a permission to specify whether people can change the "create new revision" option when they edit a post. The setting is confusing enough by itself. Having settings that change the availability of the setting is even worse.

joshuajabbour’s picture

Any more thoughts on this?

I thought this is what the checkbox in content>default workflow does, but it's not the case. If I set up blog posts to have revisions, the only people who create revisions are people who have "administer nodes" access.

That's not very logical, considering there is this option in 'default workflow'. One would assume that if a node type is setup to create revisions, then it always creates revisions...

clairem’s picture

What happened to this suggestion? I really like the idea, and would like to see it implemented.

I am using Drupal for a new informational site, where the information is about legal options. So accuracy is crucial, and with several editors co-operatively maintaining it, there is plenty of scope for small errors creeping in.

For this sort of site, the idea of being able to enforce creation of new revisions on a per-node-type basis sounds like a critical measure to maintain an audit trail of changes.

It would make Drupal a much more powerful tool for informational sites, especially if combined with the proposal to allow revisions to be compared.

Drupal already does a very good job of community-type functions, and these audit-trail features would greatly improve its suitability for management of more canonical types of content.

If anyone had the energy, a further tweak to help information-type sites would be to separate out some of the permissions for nodes: see http://drupal.org/node/16124

chrismessina’s picture

Nick Nasser has this right:

I think the idea that revisions are a per-node-type option is right on.

I’m going to be writing a proposal for a unified and more powerful node-type system. This idea should be part of the options that you can set per node-type: ”[ ] Can revisions of this node type be made?”

I think this would make a lot more sense and be easier to manage/find. I also think that an administration page for all node-types would be of some value, so I’m not proposing that this option be buried under layers of admin pages.

cat ivan’s picture

I'm entirely in favour of a revision setting per node-type.
Defaults could: node and most types=no rev; book=by default.
This is essential for a useful wiki module.

braquin’s picture

Version: » 4.6.0

Just a ditto on the node level option for turning revisions on/off. I am currently evaluating drupal for my organisation and revision management is a key requirement for the main parts of the site, but I do foresee adding blog and discussion nodes later in which the revision system is not required/desirable.

markstos’s picture

StatusFileSize
new927 bytes

Attached is a hack to always create a new revision. It's a "hack" because it just converts the checkbox into a hidden form field that always true. An enterprising individual with access to the edit the page could submit the value as unchecked. (This would have to be malicious.)

A better solution would implement the logic out of the reach of mere users. I'm not ready to dive that deep yet, though...

webchick’s picture

Revision creation by node type can actually already be done.

  1. Go to: administer >> content
  2. Click the configure tab.
  3. Click the content types tab.
  4. Each node item is listed. Click the configure link next to a type.
  5. Under Workflow, in Default options, you'll see checkmarks for all the publish options. Check or uncheck them as desired.
  6. Repeat for each content type.

If this solves the problem, please close the bug. :)

boris mann’s picture

Status: Active » Closed (works as designed)

I'll take the heat and close this. You can set this globally per node type (and have been able to all through 4.6 at the very least), and regular non-admin users can't see/set the checkbox whether on or off.