Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ravi Motha 290 posts 500 karma points MVP 8x c-trib
    Jul 20, 2015 @ 09:38
    Ravi Motha
    0

    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..

    any pointers?

  • Marc Goodson 2149 posts 14377 karma points MVP 9x c-trib
    Jul 20, 2015 @ 12:23
    Marc Goodson
    0

    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 ?

  • Ravi Motha 290 posts 500 karma points MVP 8x c-trib
    Jul 20, 2015 @ 12:29
    Ravi Motha
    0

    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

  • Marc Goodson 2149 posts 14377 karma points MVP 9x c-trib
    Jul 20, 2015 @ 12:38
    Marc Goodson
    1

    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 ...

  • Ravi Motha 290 posts 500 karma points MVP 8x c-trib
    Jul 20, 2015 @ 12:48
    Ravi Motha
    0

    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

  • Ravi Motha 290 posts 500 karma points MVP 8x c-trib
    Jul 21, 2015 @ 10:46
    Ravi Motha
    0

    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..

Please Sign in or register to post replies

Write your reply to:

Draft