jump to navigation

We got rid of the “internal” draft issue, who’s next? January 20, 2006

Posted by Paul Borgermans in eZ publish.
trackback

If you are using eZ publish with lots of “editors”, usually when implementing a portal with collaborative features, you probably faced the issue of drafts created by users without storing anything.

It bothers me for a long time.
The reason: eZ publish creates a draft version of an object whenever an edit action is called by a user. Wether that user stores a real draft version or not, the next time someone tries to edit the given object, a “nice” screen is presented that the object is currently being edited by you or someone else.

In highly collaborative situations, this turns users off, confuses them, and in our real life applications make them think it is impossible to do what they intended to. Really annoying or even worse…
The issue was discussed quite some time ago in the forums and during the eZ publish 2005 summer conference by Derick and me, and the best idea to solve it was to create a new status value for objects for the draft created by te edit action when called. In this way, this “internal” draft could be distinguished from real stored drafts … and a cron job could periodically scan the database and remove the internal drafts
I did not have the time to do it, but my collegue Kristof implemented the above idea recently and more: he patched the edit action even more. When there is an “internal draft” and the user who created this is no longer logged in, the internal draft is ignored and a normal edit screen is presented. That even avoids the need for running a cron job.

Go check out the patch at http://pubsvn.ez.no/community/trunk/hacks/untoucheddrafts/ for the 3.6 and 3.7 versions and tell us here or in the forums what you think. If all goes well, it may land in 3.8 with patches from us against the previous versions on pubsvn.

Cheers

About these ads

Comments»

1. Kristof - January 22, 2006

Hi Paul

The internal drafts of a user are also deleted when he/she logs in.

2. Paul Borgermans - January 22, 2006

Hey Kristof

Forgot about this, sorry.

Time to put your patch on the sdk mailing list for review ;-)
Needed too: a clean-up script for sites that upgrade and have still internal drafts not marked like that.

3. Tony Wood - January 23, 2006

Brilliant. Thanks Paul.

This is the bane of editors lives… The fix will make life a lot easier.

4. Yngve Bergheim - January 23, 2006

Very good hack! Drafts have annoyed and confused my editors too. I’m looking forward to see this in eZ 3.8!

5. Ronny Vedå - February 24, 2006

Good work. This will avoid a lot of confusion. Thanks kristof.

6. Leif Arne Storset - February 24, 2006

If you want to just get rid of the annoying and confusing dialog box, simply set site.ini:[ContentSettings] EditDirtyObjectAction=usecurrent . (The default value is showversions.)

The disadvantage is obviously that you’ll get a bunch of old drafts lying around.

7. Paul Borgermans - February 24, 2006

The patch is not only avoiding old drafts, it is a better implementation as with “usecurrent” you may end up with valid drafts becoming obscured


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: