Copied to clipboard

Flag this post as spam?

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


  • Roger Withnell 128 posts 613 karma points
    Oct 06, 2016 @ 20:14
    Roger Withnell
    0

    Page in the front office navigation but not in the back office

    I am using 7.2.8 with multiple sites on one Umbraco instance.

    I have a parent page with several child pages. The name of the parent page is "Town Council" and one of its child pages is also called "Town Council".

    I changed the document type of the parent page. Since then, I have the parent page "Town Council" with its same child pages but, in the navigation bar on the website, there is another top level page called "Town Council". This page is not in the back office content tree!

    For information, here is the code for my navigation bar, which works fine on over 20 other sites on the same Umbraco instance.

      <nav class="navbar navbar-default dropdown-onhover no-fix" id="navBackgroundImage" role="navigation">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse"
                            data-target="#example-navbar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    @*<a class="navbar-brand" href="/">Upperbridge Parish</a>*@
                </div>
                <div class="collapse navbar-collapse" id="example-navbar-collapse">
                    <ul class="nav navbar-nav">
                        @{ var vHomeNode = Model.Content.AncestorOrSelf(2);
                         var vClass = "active";
                         var vNoClass = "";
                        }
                        <li class="@Umbraco.If(vHomeNode.Id == CurrentPage.Id, vClass, vNoClass)">
                            <a href="@vHomeNode.Url">Home</a>
                        </li>
                        @foreach (var pageLevel1 in vHomeNode.Children.Where("Visible"))
                        {
                            if (pageLevel1.Children.Where("Visible").Count() > 0)
                            {
                                <li class="dropdown @Umbraco.If(pageLevel1.Id == CurrentPage.Id, vClass, vNoClass)">
                                    <a href="@pageLevel1.Url" class="dropdown-toggle" data-toggle="dropdown">@pageLevel1.Name <b class="caret"></b></a>
                                    <ul class="dropdown-menu">
                                        @foreach (var pageLevel2 in pageLevel1.Children.Where("Visible"))
                                        {
                                            <li class="@Umbraco.If(pageLevel2.Id == CurrentPage.Id, vClass, vNoClass)">
                                                <a href="@pageLevel2.Url">@pageLevel2.Name</a>
                                            </li>
                                        }
                                    </ul>
                                </li>
                            }
                            else
                            {
                                <li class="@Umbraco.If(pageLevel1.Id == CurrentPage.Id, vClass, vNoClass)">
                                    <a href="@pageLevel1.Url">@pageLevel1.Name</a>
                                </li>
                            }
                        }
                    </ul>
                </div>
    
    </nav>
    

    I moved all the child pages from underneath the parent page "Town Council" and then deleted this parent page but I still have a top level "Town Council" in the navigation bar which is not in the back office content tree.

    It seems, perhaps, that the database is corrupted and has an entry that should have been deleted. If so, I can't find it. If this is the case, which table of the database should I look in to find a superfluous "Town Council" record? if this isn't the case, how do I resolve this problem, short of deleting the content of the whole site and starting again.

    Your help would be much appreciated.

    Thanking you in anticipation.

    Roger

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Oct 09, 2016 @ 14:37
    Dennis Aaen
    0

    Hi Roger,

    Could you please try go to the /App_Data/ and delete the umbraco.config, The umbraco.config file is the XML cache, which is where data is fetched from when you're rendering your pages. It represents each published node from the content tree.

    So after you have deleted this file, please try republish the entire site, this will create the umbraco.config, file again with the updated data, hopefully this should show the right data.

    Hope this helps,

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft