page returns 404; child page using same template does not
I'm using a simple umbraco template to get and display child pages for seo
howerver for Nodes of the Country level, i get a 404 page is left blank, but for the children pages it works dandy..
@using ISC.Web.Models.Cms.Content;
@inherits UmbracoViewPage<IPublishedContent>
@{
Layout = "_SiteMasterView.cshtml";
// IscStandardPage iscPage = new IscStandardPage(Model);
}
@*<div class="wrapper-block container">
@if (iscPage.SliderPicker != null)
{
@Html.Partial("Slider", iscPage.SliderPicker)
}
@Html.Partial("~/Views/Partials/Breadcrumb.cshtml", Model)
<h1>Independent schools in @Model.GetPageH1()</h1>
@if (Model.GetPropertyValue("introParagraph") != null)
{
<p class="intro">@Model.GetPropertyValue("introParagraph")</p>
}
<p>Find <strong>independent schools in @Model.GetPageH1()</strong> using the list below.</p>
<p>Alternatively, why not visit our <a href="/find-a-school/">Find a School section</a>. Here you can find out more about independent schools in @Model.GetPageH1(), use our school search and view a list of independent schools for special educational needs.</p>
<ul class="school-directory">
@foreach (IPublishedContent childContent in Model.Children)
{
<li><a href="@(childContent.Url)">@(childContent.Name)</a></li>
}
</ul>
</div>*@
I've just been commenting stuff out to see what casues if it causes any error, and big fat nothing..
I was half way through typing before I saw it was commented out :-)
So yes, (obvious stuff that you have already done) check the doctype, can use that template, check it's published (what is the url in the back office on the propeties tab) and check that doctype not being hijacked - if you don't have access to the code to check hijack - create a new doctype called summink different with same properties, and see if that magically is ok ...
stepped away, hada think and someone else beat me to the answer.. we had a route which was interfering with the page load, we no longer needed the route, took out the code , rebuild and voila working pages..
page returns 404; child page using same template does not
I'm using a simple umbraco template to get and display child pages for seo
howerver for Nodes of the Country level, i get a 404 page is left blank, but for the children pages it works dandy..
I've just been commenting stuff out to see what casues if it causes any error, and big fat nothing..
any pointers?
Has parent node got an introParagraph property ?
eg use Model.HasProperty("introParagraph") && Model.HasValue("introParagraph")
rather than checking if Model.GetPropertyValue("introParagraph") != null
but looks like you have that commented that out...
...so does a template with just a
hello world
get matched ? for the country level - is that a different doctype - any route hijacking, hijacking that doctype ?even the empty template page just fails..I'd commented the code out in an effort to isolate what was erroring the page..
initially thought it was to do with null objects , but there is something else I think at the momentps will rework to use HasValue
ta for the reminder
I was half way through typing before I saw it was commented out :-)
So yes, (obvious stuff that you have already done) check the doctype, can use that template, check it's published (what is the url in the back office on the propeties tab) and check that doctype not being hijacked - if you don't have access to the code to check hijack - create a new doctype called summink different with same properties, and see if that magically is ok ...
might be the last option.. I was hoping for a fast doofus fix.. but if i had more time I'm sure I'd get there
hey ho
ta for your help Ravi
stepped away, hada think and someone else beat me to the answer.. we had a route which was interfering with the page load, we no longer needed the route, took out the code , rebuild and voila working pages..
is working on a reply...