Hello all,
I'm not a programer, I haven't reviewed CMSms' code, I'm not in the (wonderfull) DevTeam, I have no money to sponsor this feature. Hence my contribution here in only loudly thinking hoping it helps the CMSms ecosystem as a whole. Of course I don't demand the DevTeam and contributors do this or that. CMSms is their product and they are free to code how they want and like.
Once upon a time I wrote somewhere in these forums : a content approval feature requires the content versioning feature. Because what is approved is one specific version and what is edited is a new, not yet approved version. Hence everything is a version.
If you need the approval feature you have to sponsor the versioning feature FIRST.
As soon as strong versioning is working content approval is simple to implement : approvers review lists of content (and/or notifications) and change the approval status (the same wat they would change the caching status or the page alias) and the frontend is slightly modified to render only the latest approved version (implementation suggestion hereafter).
Today I add : the content versioning feature lessen the need of the locking feature. This is a benefit of versions : an edit produces a new version. Two concurrent edits produce two distinct versions. None trashes the other one. Both are recorded and can be copy paste from to edit a consolidated version (the one that will be approved

See, "locking" is managed by exception : there is a notification to reconcile content and no more data loss.
jack4ya wrote:
Isn't it possible to have (...) "content_draft" next to the "content" in the db table cms_content_props.
(...)
Is this a good idea? Can anyone help me with this
Is this is a bad idea? Why, and what would be a better solution?
My opinion is that it is a bad idea (sorry

It is a data modelisation argument :
I'd rather a "version" field (unique counter) beside each "content" record. And NOT a "draft" field.
Furthermore, leveraging the strength of this versioning system :
I'd like an "approval_level" field and a "language_tag" field too. This way :
-a draft is a given version (record) whose approval level is zero.
-a reworked draft is another (bigger) version (record) whose approval level is (still) zero.
-a live content is the same version (or any later version, the latest in fact) whose approval level is at least N.
-N is a global parameter. With N>1 you get multilevel approval. (editors, section editor, editor in chief)
-BTW we have multilang in the core : just fill a version with the language tag you want and get it approved.
Yes, you have read this : content versioning, approval workflow and multilang. 3 fields away from today's implementation ?-)
NaN wrote:
Storing content, draft and "approval status" as content_props won't need changes to the database.
Good news. (I don't know myself) I hope you are right.
Implementation impact : I can't measure that but I would liberaly say that
-where the "content table" is read today : the frontend would be only slightly modifed ?
-where the "content table" is read and written to : there seems to be more work in the backend. But if there is already some "content_props" thing to tag content with version, approval_level and language it may be better ?
Could this apply for Google SoC 2009 ?-)
Have fun all
Pierre