-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove VersionOptions.AllVersions
#16027
Comments
_contentManager.GetAsync(contentItemId, VersionOptions.AllVersions)
fails to return any content items, whether published or draft
Isn't this what #11433 addresses? |
A note for this and #11433 @hyzx86 about
Also, there's no need for something like an |
_contentManager.GetAsync(contentItemId, VersionOptions.AllVersions)
fails to return any content items, whether published or draftVersionOptions.AllVersions
I suggest we remove the If a user wants historical list of version they would use the ContentItemIndex to filter them. We could add a custom method that takes a simple query filter and would use the Load from DefaultContentManager to handle the lifecyle events. |
#16077 takes the make it work approach, with throwing in Any comments? |
For an explanation, see comments below from #16027 (comment). We should remove
VersionOptions.AllVersions
.The original issue below is kept for context.
Describe the bug
The method
_contentManager.GetAsync(model.ContentItemId, VersionOptions.AllVersions)
fails to return any content items, whether published or draft. When debugging in Visual Studio with "Just my code" disabled, execution enters the conditionelse if (options.IsDraft || options.IsDraftRequired)
inDefaultContentManager
here.I'm unsure why this condition is satisfied, given that my content item is published and the boolean
IsDraft
andIsDraftRequired
are set tofalse
.Screenshots are provided for reference.
To Reproduce
Steps to reproduce the behavior:
IContentManager
from dependency injection to retrieve the Content Item by its ID withVersionOptions.AllVersions
set, like this:_contentManager.GetAsync(model.ContentItemId, VersionOptions.AllVersions)
Expected behavior
A published or drafted Content Item must be returned when I set
VersionOptions.AllVersions
Screenshots
My Content Item:
IsDraft
andIsDraftRequired
are false, why the condition is satisfied?The text was updated successfully, but these errors were encountered: