- [X] Checked the logs and have provided the logs if I found something suspicious there
I’m submitting a…
- [ ] Regression (a behavior that stopped working in a new release)
- [ ] Bug report
- [ ] Performance issue
- [X] Documentation issue or request
- [X] I don’t know what you would call it !
Existing code similar to below would populate the foundBio.DataDraft property if a draft version was available - actually, if a draft wasn’t available, because the content was published, the DataDraft property would be the same as the Data property. Now with the latest version, it is always returning null
QueryContext ctx = QueryContext.Default.Unpublished(true);
PersonalBio foundBio = await this.PersonalBioClient.GetAsync(Id, ctx);
I was expecting the DataDraft property to be populated. As an additional note I am seeing that the DataDraft property is marked as “obsolete”, which may point to the problem… which is I’m missing some updated documentation which explains how to retrieve drafts in the new system ?
it has been described in the forum.
Previously I had both versions in one collection, but some of the fields became so big that we have hit the MongoDB limit and performance was bad for these content items.
Therefore I had to split it into two collections.
Another reason was this:
This has been implemented but only 2 versions are supported.
Thanks for the reply Sebastian, so is the implication from this, that in order to obtain the draft content from a client, you simply set the “Unpublished” property to true on the QueryContext and the results from your query will contain the draft data in the “Data” property ? Or is there a filter of some sort that allows you to return a specific version of content, which includes the “draft” version ?
I’m finding that the “status” of the content is always “Published” even if there is a draft version. Is there an alternative way to find if the content has a draft ?
From a little more digging around, it looks like there is a new property called “newStatus” returned in the api that is set to “draft” when there is a draft (and the X-Unpublished header is set to “true”). Is this correct ?