Drafts - disable the automatic draft function ?

Author Message

Helle Andersen

Monday 24 October 2005 12:34:44 am

Ver. 3.4.
Our database is growing rapidly, primarily - we think - because of a large number of unintended drafts. With ca. 200 local editors this is perhaps not so strange.
Is there a way to disable eZ from making drafts every time you leave a page in an edit mode (e.g. by clicking on "Back") and only making drafts when an editor clicks on "store draft".
Or perhaps a way to make eZ provide a pop-up saying "You have not stored this draft - do you wish to do so ?"
Is there a way as administrator to delete all drafts older than xx date and/or set limits for how many drafts an editor can have ?

Łukasz Serwatka

Monday 24 October 2005 3:14:39 am

Hi Helle,

You can't disable versions control because a temporary version is created as draft version while editing object. So if you will set VersionHistory=1 you will not be able to edit object.

You can limit versions to min 2 in content.ini configuration file or enable DeleteDrafts, for automatic draft deletion.

Look also on:
http://ez.no/products/ez_publish_cms/documentation/incoming/remove_confirmation_when_discarding_an_object

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Helle Andersen

Monday 24 October 2005 4:17:11 am

Well, but I do not want to limit version control. In fact because of all these unintented drafts I have had to increase the number of versions from 10 to 20 - otherwise the "real" drafts and the real versions of pages get lost between the uninteded drafts. The ideal would be if you could specify separately the number of real version and the number of drafts.
What does enable DeleteDrafts do ?
And is it possible as an administrator to delete old drafts ?

Bård Farstad

Thursday 03 November 2005 6:41:29 am

Helle, mabye the best solution in this case would be to have a script which purges all drafts which are older than 1 or 2 weeks.

This script could be executed nightly.

Allthough this might not be a good thing if the editors uses the drafts to store temporary content for a long time period.

-bård

Documentation: http://ez.no/doc

Per-Espen Kindblad

Thursday 19 January 2006 6:38:51 am

I agree with Helle. Our users are also not so very happy with the case that every time they edit a page, a new draft is created. And you've right..the important drafts just dissapear because of this.

There should be options:
- ..if a user has modified an existing object, then he/she should get the option to overwrite the published object, or publish, but archive the old published one, and publish the newer one ++

..this is not so hard to change in the eZ publish code, but it should be default in the eZ publish code.

Per-Espen Kindblad
Oslo University College

Kristof Coomans

Friday 20 January 2006 5:16:14 am

I've made a hack to automatically remove drafts that haven't been changed. It's in pubsvn: http://pubsvn.ez.no/community/trunk/hacks/untoucheddrafts. Currently we're still testing it at one of our portals, but I would be happy if other people already give it a try.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Marko Žmak

Friday 27 January 2006 2:34:01 pm

I think I found the apropriate sollution for this problem. I started inspecting some eZ code in order to find the sollution and came accross an interesting INI setting...

Just put:

EditDirtyObjectAction=usecurrent

in your site.ini (in overrides or siteacces) and automatic Drafts are disabled.

Now I see the setting is described in the docs:

http://ez.no/doc/ez_publish/technical_manual/3_6/reference/configuration_files/site_ini/contentsettings/editdirtyobjectaction

and was mentioned on the eZ site several times, but I still had to find it by myself. C'e la vie.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.