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:
http://myurl.com/assets/css/canvasdesigner.css
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 :-)
Bit of an old thread, but I just ran into this problem. I can see why the code above would fix it, so I dug a little deeper. We had a rewrite rule setup to remove trailing /, and because the preview URL is /umbraco/preview/, it was then transformed to /umbraco/preview which then broke all the relative URLs!
Here's the amended IIS rewrite rule config, should anyone find it useful:
Preview Not Working
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: http://myurl.com/assets/css/canvasdesigner.css
If this were due to rewriting if I typed: http://myurl.com/umbraco/assets/css/canvasdesigner.css
the URL would be written to http://myurl.com/assets/css/canvasdesigner.css
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
any suggestions greatfully appreciated.
The changed parts of the app settings in the web.config which are not standard are
Is probably worth mentioning that this is an upgrade from a 7.4 site
& also that this is what it looks like:
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.
Having the same issue after upgrading from 7.6.9 to 7.12.1. Would love to hear about any progress!
Hi Thomas, We have found a solution at my office, i have posted the code below :)
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.
Yes, u are exactly right ! Even in 2020 you answer helped me with supporting. Works for me.
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
in
and in views\Preview\index.cshtml the following
line 10,11,12
line 29,30,31
and line 148 and 149
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
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 :-)
Bit of an old thread, but I just ran into this problem. I can see why the code above would fix it, so I dug a little deeper. We had a rewrite rule setup to remove trailing
/
, and because the preview URL is/umbraco/preview/
, it was then transformed to/umbraco/preview
which then broke all the relative URLs!Here's the amended IIS rewrite rule config, should anyone find it useful:
<rule name="RemoveTrailingSlashRule1" stopProcessing="true"> <match url="(.*)/$" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="true"> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_URI}" pattern="^/umbraco/" negate="true" /> </conditions> <action type="Redirect" url="{R:1}" /> </rule>
is working on a reply...