Preview Pending Content (draft)

  • [x] Documentation issue or request
  • [x ] Self hosted with docker

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).

I only add a preview url in my schema, I didn’t modify the squidex code (I’m not sure to understand the step 1 here : https://docs.squidex.io/02-documentation/developer-guides/preview ).

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:

  1. The proposal is accepted, then data will become dataDraft (data <= dataDraft)
  2. 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.

Hi,

Thank you for the explanation.

Currently I clone a content, update the cloned content, preview it, publish it + delete the old one. Do you know a better workaround ?

Is there a chance that it will be add to the roadmap ?

As soon as I know how the feature should look like I will put it in the roadmap. Or do you have a specific and concrete requirement?

My only concern is that I would like to see the updates I am about to publish for an already published content.

I just wanted to know if it was something you thought about / planned to add to the roadmap / knew some workaround.

But I have answered that. You can check dataDraft instead of data.