I have a published content and I ‘save as draft’ an update of this content (the content is now “Pending”). When I add the x-unpublished header I still fetch the publish content.
I expected to fetch the draft content and not the published one.
Others:
It works fine when the content hasn’t been published yet, but once the content is published, I can’t have access to the draft ( = unpublished updates).
Hi, it is a little bit complicated and I am looking forward for a better solution.
A content has two kind of data objects
data
dataDraft
And a status, usually Draft, Archive, Published
In the editor you make all changes to draft and dataDraft will be updates as well. But when you have a published content you can make a proposal: “I want to propose an update to the published content”. Then your draft will not updated only draft.
If you have saved a proposal there are two possible outcomes:
The proposal is accepted, then data will become dataDraft (data <= dataDraft)
The proposal will be discarded, then dataDraft will become data (dataDraft <= data)
So, when you use X-Unpublished I would always use dataDraft.
As I said it is not optimal, and too complicated right now.
I just got the same request from the client. In there instance, they want to preview what a blog item will look like before they publish it. There is a problem with this from an implementation point of view, because although we have a standalone instance of Squidex as the CMS, the website in Angular.js and could be hosted elsewhere. So how would you be able to ‘Preview’ a post that is in DRAFT. Going to be very difficult to implement.
My suggestion to the client; Load it and publish it. Look on the website and if it not correct, set to draft