Copied to clipboard

Flag this post as spam?

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


  • Stephen 6 posts 96 karma points
    May 18, 2020 @ 13:27
    Stephen
    0

    Preview mode breaking ContentAtRoot page urls?

    Hi folks,

    I have a site set up on Umbraco v8 and we've just noticed a very peculiar bug: if an admin has the Preview mode open in the backoffice, dynamic page URLs are being rendered as '#' even when they're accessing the site in other windows. Since our top menu uses page.URL in order to be dynamic, this means that anyone who's editing the site has severe difficulty also navigating the site unless they exit out of Preview mode first.

    Does anyone know what might be causing this?

    The code for the dynamic menu section is as follows:

                    <li><a href="/">Home</a></li>
                    @foreach (var page in Umbraco.ContentAtRoot().FirstOrDefault().Children.Where(x => !x.IsVisible()).OrderBy(x => x.SortOrder))
                    {
                        <li class="@(Model.IsAncestorOrSelf(page) ? "active" : null)">
                            <a href="@page.Url">@page.Name</a>
                        </li>
                    }
    

    Whether it's all of the page.Urls becoming # or just some of them doesn't seem to be consistent, which is also concerning.

  • Stephen 6 posts 96 karma points
    Jun 01, 2020 @ 13:21
    Stephen
    0

    Has anyone else run into this? Preview mode leaking out into other windows seems like it'd be an issue that crops up with editors at least occasionally

Please Sign in or register to post replies

Write your reply to:

Draft