Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
We're using USkinned. It has page nodes, under each page node it has a page components folder node and then page component nodes under there (see image below).
I have a problem where, when in preview mode, if the parent page component is unpublished, it wont render the child page components on the page regardless to whether they're published or not.
If I try to preview the child component directly (which should redirect to the parent page component) then I get an error in the Uskinned base controller (set as the default render MVC controller).
It tries to get the home node using model.Content.AncestorOrSelf(1) but that is apparently null as the exception I'm getting is a null reference exception when calling homeNode.IsDocumentType(blah):
public override ActionResult Index(ContentModel model)
IPublishedConterent homeNode = model.Content.AncestorOrSelf(1);
USNBaseViewModel customModel = new USNBaseViewModel(model.Content);
if (homeNode.IsDocumentType("USNHomepage")) <<< null ref exception here.
The odd thing is that it works fine when I'm debugging, I only have this issue in the production environment making it very hard for me to figure out what the problem is!
Has any one else had these issues or have any clue what could be causing it?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted