Make versioning / drafts optional per class

Author Message

Karsten Jennissen

Monday 23 June 2003 7:25:01 am

Picking up a very good suggestion from Paul K Egell-Johnsen and Selmah Maxim from this thread:
http://ez.no/developer/ez_publish_3/forum/developer/this_is_not_logic_specification_in_ezp3_
I'd like to second that and suggest a simple switch in the class definition to turn on / off versioning, storing of drafts and maybe even translations.

This is basically an optimization switch to take load off the database. E.g. in many instances versioning is not needed for users and drafts are in my view not necessary in any case for users. There surely are other types of classes where this applies as well.

I would probably make sense to provide this switch not only for classes but also for objects / nodes?!

Karsten

Bård Farstad

Monday 23 June 2003 7:45:26 am

It's really not that simple to disable versioning and drafts. As it works today you need to have drafts and at least two versions ( for re-publishing ). But you can clean up versions after publishsing. We should add a feature for setting the number of versions to keep in the history. ( e.g. 5 versions for article 2 for forum etc.. ).

We should add more features to the versioning system so you would be able to purge old versions ( "flatten versions" ) on a pr object basis.

That beeing said. There are quite some optimizations we can do. E.g. with translations, there is an overhead in joining with the translation table.

--bård

Documentation: http://ez.no/doc

Karsten Düsterloh

Friday 15 October 2004 5:54:30 am

We found this kind of hack (for 3.4.2) to turn of the draft versioning mechanism:
just override the content/edit_draft.tpl with this:

{let
last_draft=$object.versions|extract_right(1)[0]
content_attributes=$last_draft.contentobject_attributes
main_node_id=$last_draft.main_parent_node_id
edit_version=$last_draft.version
edit_language=$last_draft.translation.language_code
attribute_base='ContentObjectAttribute'
}

{include uri="design:content/edit.tpl"}

{/let}

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