I have some trouble with the preview function in an Umbraco installation.
The preview mode broke after i updated the CMS about a year ago, and now the client is really missing the feature.
When entering preview mode this is what happens:
Does anyone have any idea where i should start bug-fixing this? I can see that i have a folder in /Umbraco/preview.old - can it be that I would have to correct some links? If so, does anybody know where?
Adding a standard rewrite rule to remove trailing slashes results in a URL like the one in your screenshot, with no slash between 'preview' and the query string. This causes several requests for scripts and stylesheets that the preview mode relies upon to return 404 errors.
I managed to work around this by adding a condition to my rewrite rule that ignores Umbraco Back Office URLs.
Preview broken in Umbraco v 7.10.4
Hello everyone,
I have some trouble with the preview function in an Umbraco installation.
The preview mode broke after i updated the CMS about a year ago, and now the client is really missing the feature.
When entering preview mode this is what happens:
Does anyone have any idea where i should start bug-fixing this? I can see that i have a folder in /Umbraco/preview.old - can it be that I would have to correct some links? If so, does anybody know where?
Thank you so much in advance.
Best regards, Magnus
Hi Magnus,
Do you have a web.config rewrite rule that is removing trailing slashes from URLs? I've encountered this same issue, and that was the cause.
From what I've been able to work out, Umbraco 7+ expects the URL of the preview page to be something like:
Adding a standard rewrite rule to remove trailing slashes results in a URL like the one in your screenshot, with no slash between 'preview' and the query string. This causes several requests for scripts and stylesheets that the preview mode relies upon to return 404 errors.
I managed to work around this by adding a condition to my rewrite rule that ignores Umbraco Back Office URLs.
Hi Stephen,
Thank you for reaching out!
I have the following rewrite rules in my web.config file:
Should i rewrite the rewrite rules? ;)
I don't seem to have the REQUEST_URI input.. But i am not that familiar with rewrite rules.
Thank you in advance.
Hi Magnus,
That's correct. The line
is a condition that:
You'll need to add this to your own "Remove trailing slash" rules to have them not be applied to the Umbraco Back Office.
hey Stephen
Sorry for the slow reply!
That worked - Thank you so much.
Have a great day!
is working on a reply...