IContentService.GetById returning null while published content is available
I have a node in it's IPublishedContent variant. Now when I try to get it from the IContentService.GetById the content service returns null.
You can see that the publishedContent has a value, but why does the IContentService not return the published content as IContent? I need it to delete the content programatically.
I know IContentService is initialized properly because I can get other items with it.
Got a solution. Instead of parsing the publishedContent.Id I need to give it the Key. Which is weird because the method accepts both. But Id seems to be broken for whatever reason in our project.
IContentService.GetById returning null while published content is available
I have a node in it's
IPublishedContent
variant. Now when I try to get it from theIContentService.GetById
the content service returnsnull
.You can see that the
publishedContent
has a value, but why does theIContentService
not return the published content asIContent
? I need it to delete the content programatically.I know
IContentService
is initialized properly because I can get other items with it.Got a solution. Instead of parsing the
publishedContent.Id
I need to give it theKey
. Which is weird because the method accepts both. ButId
seems to be broken for whatever reason in our project.is working on a reply...