Copied to clipboard

Flag this post as spam?

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

  • John C Scott 473 posts 1183 karma points
    Sep 21, 2018 @ 12:57
    John C Scott

    I'm using 7.12.3 When I hit preview I don't get a preview page. When I look at sources in the inspector I see that the /umbraco part of the URL is missing. There's a lot of URL rewriting going on with the site and I'd assume that's the problem however I'd assume that for example where I'm getting for example:

    If this were due to rewriting if I typed:

    the URL would be written to

    It's not, it serves the CSS file as expected. Any other ideas as to what could be the cause of this?

    The URLs from the page source of the page: http://myurl.local/umbraco/preview?id=41703 are

    <link href="../assets/css/canvasdesigner.css" type="text/css" rel="stylesheet" />
    <link href="../lib/spectrum/spectrum.css" type="text/css" rel="stylesheet" />
    <link href="../lib/jquery-ui/jquery-ui-1.10.4.custom.min.css" type="text/css" rel="stylesheet" />

    any suggestions greatfully appreciated.

    The changed parts of the app settings in the web.config which are not standard are

        <add key="umbracoHideTopLevelNodeFromPath" value="false" />
        <add key="umbracoUseDirectoryUrls" value="true" />

    Is probably worth mentioning that this is an upgrade from a 7.4 site

    & also that this is what it looks like: enter image description here

  • Tom Ruddock 3 posts 24 karma points
    Oct 25, 2018 @ 11:06
    Tom Ruddock

    I'm having this exact issue following an upgrade from v7.5.9. I'm still having a poke around myself, but any help would be hugely appreciated.

  • Tomas 5 posts 27 karma points
    Oct 26, 2018 @ 08:42

    Having the same issue after upgrading from 7.6.9 to 7.12.1. Would love to hear about any progress!

  • Kristoffer Jensen 2 posts 74 karma points
    Dec 02, 2021 @ 11:51
    Kristoffer Jensen

    Hi Thomas, We have found a solution at my office, i have posted the code below :)

  • Tomas 5 posts 27 karma points
    Oct 26, 2018 @ 10:07

    Turned out is was a rewrite rule to remove trailing slash that caused this issue. Not sure exactly why but removing it made all the difference.

  • Yevhenii_Koliesnik 3 posts 73 karma points
    Aug 11, 2020 @ 12:14

    Yes, u are exactly right ! Even in 2020 you answer helped me with supporting. Works for me.

  • Kristoffer Jensen 2 posts 74 karma points
    Dec 02, 2021 @ 11:14
    Kristoffer Jensen

    Hey i have experienced the same issue. we fixed this by making some changes in the .js files that run the preview.

    in umbraco.canvasdesigner.js we changed line 22 to the following

    $scope.pageUrl = '/umbraco/dialogs/Preview.aspx?id=' + pageId;


    and in views\Preview\index.cshtml the following

    line 10,11,12

    <link href="/umbraco/assets/css/canvasdesigner.css" type="text/css" rel="stylesheet" />
    <link href="/umbraco/lib/spectrum/spectrum.css" type="text/css" rel="stylesheet" />
    <link href="/umbraco/lib/jquery-ui/jquery-ui-1.10.4.custom.min.css" type="text/css" rel="stylesheet" />

    line 29,30,31

    <img ng-src="/umbraco/assets/img/application/logo.png"
                     ng-srcset="/umbraco/assets/img/application/[email protected] 2x,
                    /umbraco/assets/img/application/[email protected] 3x" />

    and line 148 and 149

    <script src="/umbraco/lib/rgrove-lazyload/lazyload.js"></script>
    <script src="/umbraco/js/canvasdesigner.loader.js"></script>

    in the canvasdesingner.loader.js file, you want to edit the url so it can be found. This is how the file looks after the changes:


    ], function () { jQuery(document).ready(function () { angular.bootstrap(document, ['Umbraco.canvasdesigner']); }); });

    what the code does, is to change the paths to the files, so they fit with what the preview is asking for :)

    Hope it helps someone

  • Simon steed 374 posts 686 karma points
    Mar 29, 2022 @ 10:06
    Simon steed

    I've just had exactly the same problem on a clients live site, however their staging site was working fine.

    The fix Kristoffer posted works fine - however i'd love to know why it's suddenly broke, currently got staging still using the old code and live using the new :-)

Please Sign in or register to post replies

Write your reply to: