Copied to clipboard

Flag this post as spam?

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


  • Michael 5 posts 75 karma points
    Jun 05, 2018 @ 23:54
    Michael
    0

    Preview not working in 7.10.2

    I'm having an issue with preview not working. The page loads but all of the JS 404s, so its just a broken preview page. Its trying to load the following path, its missing the 'umbraco' part:

    http://bad.example.com/assets/css/canvasdesigner.css

    The site is running Umbraco version 7.10.2

    Comparing with a site running 7.9.2 with working preview, I can see the difference is a missing trailing slash in the preview:

    http://bad.example.com/umbraco/preview?id=1184

    http://good.example.com/umbraco/preview/?id=1184

    Preview page uses relative paths for assets, thus the 404. Any idea what has changed this?

  • Michael 5 posts 75 karma points
    Jun 06, 2018 @ 00:10
    Michael
    0

    So it turns out I had a redirect removing trailing slashes & addTrailingSlash set to false in umbracoSettings.config - removing this fixes the 404s.

    However I'm confused because my good.example.com site has these same redirects and addTrailingSlash set to false and the preview URL still appears with a trailing slash.

  • Patrik 37 posts 89 karma points
    Dec 07, 2018 @ 10:03
    Patrik
    0

    Hi

    I also faced this issue with Umbraco version 7.12.3 assembly: 1.0.6837.12334.

    For me, when running the site from Visual Studio/IIS Express on a url like localhost:3423, the preview worked. But if i tried from my local IIS site with binding example.local i got like 14 errors in the console; alot of 404's on css and js files related to the preview functionality. The url's to the css and js files was wrong, it referenced example.local/assets/... and example.local/umbraco/umbraco/... The right one is ofcourse example.local/umbraco/assets/...

    Tried the addTrailingSlash-setting but no luck. I also fiddled around with some url rewriting rules but that didn't work either.

    Eventually i came to think about to set the hostname of the top content node in the content tree. Right click it and select "Culture and Hostnames". Then i set the domain to example.local. After this the preview started to work when running a custom domain locally and not through IIS Express.

    I still get an 404 on http://example.local/umbraco/js/canvasdesigner.panel.js - but this isn't strange since the file doesn't exist on disc, but is referenced in canvasdesigner.loader.js. I installed through NuGet. What's the right thing to do here? Grab the canvasdesigner.panel.js from GitHub and place it in /js or delete the reference to it in canvasdesigner.loader.js?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies