Umbraco.TypedContent YSOD when passed an ID of page that has been unpublished
Hi All,
In my application i have a MOM property that allows editors to choose another IPublishedContent node (which is a player) for man of teh match. Here is my code
However, if a player node that has been selected in a MOM property has been unpublished from the site then it is causing a YSOD. The error seems very similar to this bug that has been raised expect the page has not been deleted. http://issues.umbraco.org/issue/U4-1300#tab=Comments.
Is there a fix for this, or is there a way that i can check if
IPublishedContent works only if node is publushed, maybe you can try another way for managing nodes, not publish unpublish, maybe try to use some one more picker?
Ha that does make sense considering its called iPublishedContent :). Unless someone can suggest something better I may look at using the relatedLinks datatype, i know that this doesnt YSOD.
Umbraco.TypedContent YSOD when passed an ID of page that has been unpublished
Hi All,
In my application i have a MOM property that allows editors to choose another IPublishedContent node (which is a player) for man of teh match. Here is my code
However, if a player node that has been selected in a MOM property has been unpublished from the site then it is causing a YSOD. The error seems very similar to this bug that has been raised expect the page has not been deleted. http://issues.umbraco.org/issue/U4-1300#tab=Comments.
Is there a fix for this, or is there a way that i can check if
returns null and deal with the exception.
I dont really want to have to trawl through many pages to delete links each time a player is unpublished from the site.
Any suggestions
Paul
Hi Paul,
IPublishedContent works only if node is publushed, maybe you can try another way for managing nodes, not publish unpublish, maybe try to use some one more picker?
Thanks
Hey Alex,
Thanks foro the response.
Ha that does make sense considering its called iPublishedContent :). Unless someone can suggest something better I may look at using the relatedLinks datatype, i know that this doesnt YSOD.
Mnay thanks Paul
Hi Paul,
Can you share how did you solve your issue?
So topic is solved.
Thanks,
Alex
Hi Alex,
As soon as i implement something that resolves this issue i will post my code so that it helps others ;). I havent had time to take a look just yet.
Thanks
Paul
Hi Paul,
checking the returned value for null should be enough ?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.