I am new to Umbraco and I have come across an issue that I cannot resolve.
I have a News node which is the child of an 'eng' node and can create news article children as:
/eng/news/article
Now, when I unpublish News, and navigate to /eng/news, instead of throwing a 404 and serving the Page Not Found view, Umbraco still resolves the path and tries to render the News view template passing it the parent node (eng) as the Model (which causes an error due to some methods/properties trying to be accessed which are not present on the parent node).
Now, this does not happen on any other routes/paths where I unpublish a node. For example: navigating to eng/about-us will result in the Page Not Found view if the AboutUs node is unpublished.
There are no other nodes by the same name or using the same template in any other place in the content tree. I have cleared the examine indexes and the umbraco.config in the TEMP folder and I can confirm the News node is unpublished in the database, as it does not appear in the IPublishedContent collection when the view is rendered, while having the isPublished field set to false.
Also, this issue happens locally and on the test/stage sites.
Umbraco rendering template for unpublished node
Hi all,
I am new to Umbraco and I have come across an issue that I cannot resolve.
I have a News node which is the child of an 'eng' node and can create news article children as:
Now, when I unpublish News, and navigate to
/eng/news
, instead of throwing a 404 and serving the Page Not Found view, Umbraco still resolves the path and tries to render the News view template passing it the parent node (eng) as the Model (which causes an error due to some methods/properties trying to be accessed which are not present on the parent node).Now, this does not happen on any other routes/paths where I unpublish a node. For example: navigating to
eng/about-us
will result in the Page Not Found view if the AboutUs node is unpublished.There are no other nodes by the same name or using the same template in any other place in the content tree. I have cleared the examine indexes and the umbraco.config in the TEMP folder and I can confirm the News node is unpublished in the database, as it does not appear in the IPublishedContent collection when the view is rendered, while having the isPublished field set to false.
Also, this issue happens locally and on the test/stage sites.
Please help :)
is working on a reply...