views:

253

answers:

4

I've been looking for a good way to handle revisions in Drupal, but I am yet to succeed. For some reason there is no built in way to save a draft (that I've found so far), and the modules I've tried so far do not seem to fully work. First I tried save_as_draft, which seemed to do almost what I wanted, and if I'm not mistaken, also handles CCK fields. Sadly it seems to be broken somehow, so I can't edit a page once I've saved it as a draft.. maybe I could fix it by going through the code, but that would not be my preferred solution. The other module I tried is aptly named draft, but from what I can tell, this module only handles the title and body fields, and does this in a way that appear odd to me.

Is there some common practice to solve this? I couldn't imagine that nobody had to solve this before, but I haven't found any good solution to it yet.

Clarification
I need this functionality for already existing content, that is, I want to be able to create and edit a draft version of an already published page, while the "old" version would still be available to anonymous users.

Example
On my Drupal site I have a page with current information about something, for example an event occuring this week. There is also an event occuring next week, and the information will be located on the same page (node). What I want to do is to be able to create a new revision of this event page, update it, upload new images etc, and when the time is right I want to make this new revision the current one. To achieve this the presently current revision will have to remain published the whole time, and available to anonymous users. At the same time there would be a second, unpublished revision that editors can access and edit, and publish when desired.

A: 

Unless I miss something, I guess Drupal's built-in "publish" mechanism should fit to your needs.

You want a draft ? Just don't "publish" when creating the content.
You want it even "smarter" ? Use workflow/rules.

Regards,
Shushu

Shushu
Haha, now I feel silly. It never occured to me to create a new Revision and unchecking Publish. Thank you for the input :)
Marco
Actually it turned out this is not the case. If I create a new revision and uncheck publish, the old revision is no longer visible to anonymous users. Have I missed something here?
Marco
I think that you need to define exactly what are your requirements.Do you want anonymous users to have access to old revisions ? I don't know this for a fact, but I guess all you need to do is to set the right permissions for the Anonymous role...
Shushu
Example added in original question. I don't want the "view revisions" permission, since that just adds a tab where I can see all versions of a node. What happends for me is that when I uncheck publish when creating a new revision, it's not the new revision that gets unpublished, but the node in general.
Marco
+1  A: 

FYI, if you use Publish/Unpublish, admins need Administer Nodes in order to see unpublished nodes and that is usually too much access for non-root (user 1) admins, which would be a problem if your site or any site had more than one person accessing the backend. It is not meant to be a 'wiki' like function.

There is a Revisions module and a Content Moderation module that may suit your needs.

http://drupal.org/project/revisioning

http://drupal.org/project/content_moderation

Kevin
Somehow the content_moderation module had eluded me, but other than working a little bit odd, and missing a graphical admin so set up the workflow - it seems to be exactly what I was looking for. Thank you for the advice.
Marco
A: 

You want to read http://thepoorhouse.org.uk/drupal_save_as_draft_feature much useful information in the comments. Also check out the Rules module http://drupal.org/project/rules

chx
A: 

I'm not sure if this meets your requirements exactly or not but I know that at work some of my colleagues have used the node clone module for something similar to your use case. Using this module you could clone a node and then edit the clone.

I've never used this module myself, so I can't be sure but it probably doesn't copy over the revision information. Maybe that's something that you could add in, though!

doana

related questions