Blog, Save, Author

Hello,

I would like to change a few things at the blog and would like to ask for your feedback.

Currently saving sets the author to the current user. I think the author should not be changed if it was set before (maybe only with an extra button)

If a blog post is saved it status is the to unpublished, it should keep the current status.

What do you think?

Best regards,

Gunnar

Gunnar

Answers below:

Hello,

I would like to change a few things at the blog and would like to ask for your feedback.

Currently saving sets the author to the current user. I think the author should not be changed if it was set before (maybe only with an extra button)

This is most likely because your layout is using getAuthorEmail() and getAuthorName(), this looks at the last author of the version history. If you want the creator of the entry, then use getCreatorEmail(), getCreatorName()

If a blog post is saved it status is the to unpublished, it should keep the current status.

You mean, if quick save or draft?

This is most likely because your layout is using getAuthorEmail() and getAuthorName(), this looks at the last author of the version history. If you want the creator of the entry, then use getCreatorEmail(), getCreatorName()

Great, this was what I was looking for, thanks

Ahh yes!

The dreadful state problem.

This is something that has been bothering me since the beginning and have not really tackled, but would welcome input, thoughts and pull requests :slight_smile:

Basically, a content object has publishing state controlled by three factors:

isPublished : boolean (Marks that a content object is published)
publishedDate : date (Marks the date/time that this content object should be visible if published)
expiredDate : date (Marks the date/time that this content object should NOT be visible if published)

All these are in the BaseContent object, which means it is not versioned.So the 3 bits affect history.

So the problem gets complex when you have versioning involved. Because you need to somehow determine the last published version. Example:

version active
1 - false
2 - false
3 - active

If you see that, then version 3 is the active version and that’s the content we use. But only the last version is active right now. So we would have to somehow allow for:

1 - false
2 - false
3 - active
4 - false
5 - false

Because each save operation creates a history log. So somehow we must keep the active version until you publish the last versions. But then in the editor, you need to be able to recall the active version or the working version.

Anyways, you see were I am getting, it is more complex than that.

Luis Majano
CEO
Ortus Solutions, Corp

P/F: 1-888-557-8057
Direct: (909) 248-3408

ColdBox Platform: http://www.coldbox.org
ContentBox Platform: http://www.gocontentbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano | twitter.com/gocontentbox

If the Entry / page is already published, then the work flow wold be to pull it back to Draft mode, that would ensure that a copy is made that can be edited until its approved and then published. It isn’t that hard to implement.

So lets say, the draft versions takes a couple weeks to get edited and approved. Meanwhile someone needs to make a quick change to the current live version of the page. How will the interface allow them to chose whether they want to edit the current draft or the published live page?

There are a few more complications than it originally seems.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Brad, that is why we have optimistic and pessimistic locking for databases.

The best thing you can do is poll your customers, customers and find what works for them.