Preview for unpublished items showing page not found error in umbraco 7.7.6
Hello,
I am facing one issue with preview for unpublished items. When ever i tried to preview unpublished page from backoffice , it is giving page not found 404 page. I have handled the 404 using error pages node in umbracosettings.config.
My application is hosted on AWS EC2 instances under loadbalancer using master slave configuration(1 master and 2 slave servers)
I am using Umbraco 7.7.6 for my application. Can someone help me to resolve the issue, as it is important to content editors to preview the items before sending it to the publish.
I don't see anything strange in master server logs. But when ever you modify a published page and click on preview (not save and publish),it doesn't show the modifications in preview but the last published version of content is being displayed.
If the page is not at all published, then it's throwing 404 error.
Master slave setup is working perfectly, all the content changes are reflecting in slave servers immediately.
Please let me know other possible scenarios for preview issue.
Thank you for your responses , but I do not see any log information for preview in the logs even after changing the log level to DEBUG or ALL.
I could see only the log saying it's unpublished and save xml file. After that when I preview the same item it's not logging anything in the logs, but redirecting to 404 page.
I observed and able to see unpublished item is in the config files of preview folder of App_data, but it's not present in umbraco.config immediately after the unpublish.
I checked it already and it's there in the specified path. I do not have any iis rewrite rules or redirect rules in my master server iis website, where i have the backoffice access.
I resolved the issue now. It was issue with the UmbracoStandardOwinStartup.cs class, when i added the below line app.UseUmbracoPreviewAuthentication(ApplicationContext.Current); preview started working.
I'm now at a 403 for any Preview items. Since I'm out of options I thought I'd check here. I'm not running Umbraco from source, is there any way I can set the UseUmbracoPreviewAuthentication elsewhere? In a startup handler perhaps?
I'm not 100% sure when Preview stopped working, but we have about 10 sites on 7.12 and none of them are able to Preview. We only found out about it from a client that told us how great Wordpress preview was (lol ugh).
I do have some rewrites for force-www/https but I've removed those and had the same result
I am facing the same issue that page is not getting previewed but my case is a little bit different. Preview functionality is working when the page is published but at the same time when I am unpublishing the page then the preview function is not working. Also when I try it refreshing 4-5 time then it appears for once but again if I am refreshing the page then the page shows a 404 error. Load balancing is implemented on the server and I am not sure if it is causing the error. Can anyone help me to resolve the issue of page not getting previewed when it is unpublished and saved? Any help is much appreciated.
Preview for unpublished items showing page not found error in umbraco 7.7.6
Hello,
I am facing one issue with preview for unpublished items. When ever i tried to preview unpublished page from backoffice , it is giving page not found 404 page. I have handled the 404 using error pages node in umbracosettings.config.
My application is hosted on AWS EC2 instances under loadbalancer using master slave configuration(1 master and 2 slave servers)
I am using Umbraco 7.7.6 for my application. Can someone help me to resolve the issue, as it is important to content editors to preview the items before sending it to the publish.
Thanks, Vinod Nanduri.
Double check that you have selected a template for the page in the Info tab.
Hello Mark ,
Yes i have selected the template for the page. I can even see the item gets added in the cache file in App_data/preview folder.
Could you let me know if preview gets the content from this folder or umbraco.config file?
Hi Vinod,
Do you have perhaps some rewrites configured in your web.config ? That could also break the preview.
Dave
Hello Dave,
I am accessing the preview from the master server and it does not have any rewrite rules in web.config.
Okay Vinod,
Do you see something strange in the error logs of the master server ?
And another question is of course is it really a master server ? Installing this package can help you find that out : https://our.umbraco.org/projects/backoffice-extensions/loadbalancing-information-dashboard/
Dave
Hello Dave ,
I don't see anything strange in master server logs. But when ever you modify a published page and click on preview (not save and publish),it doesn't show the modifications in preview but the last published version of content is being displayed.
If the page is not at all published, then it's throwing 404 error.
Master slave setup is working perfectly, all the content changes are reflecting in slave servers immediately.
Please let me know other possible scenarios for preview issue.
Vinod Nanduri
Hi Vinod,
What is your log level set to ? Maybe change it to DEBUG to see more information.
Dave
Hello Dave ,
Thank you for your responses , but I do not see any log information for preview in the logs even after changing the log level to DEBUG or ALL.
I could see only the log saying it's unpublished and save xml file. After that when I preview the same item it's not logging anything in the logs, but redirecting to 404 page.
I observed and able to see unpublished item is in the config files of preview folder of App_data, but it's not present in umbraco.config immediately after the unpublish.
Vinod Nanduri
Hmm,
Let's check a view things : Is the file /Umbraco/Dialogs/preview.aspx present on your server ?
And can you post your iis rewrites configuration if you have any ?
Dave
Hello Dave,
I checked it already and it's there in the specified path. I do not have any iis rewrite rules or redirect rules in my master server iis website, where i have the backoffice access.
Vinod Nanduri.
Hello Dave,
I have installed Umbraco rest api 0.9.0 also in my application. Please let me know if that alters the preview functionality.
Vinod Nanduri.
Hello guys,
Please let me know if someone can help me on this ?
Vinod Nanduri
Hi Vinod,
Can you try with a clean install and installing the default starter kit.
If it works then, try to install the Rest API package.
If it than breaks we know that it's related to the REST api package.
If it works, it will be something in your code.
Dave
Hi Dave ,
I resolved the issue now. It was issue with the UmbracoStandardOwinStartup.cs class, when i added the below line app.UseUmbracoPreviewAuthentication(ApplicationContext.Current); preview started working.
Thanks for your inputs so far.
Vinod Nanduri.
Nice to hear you tracked down the issue
Dave
Hey guys,
I've been posting various stuff about Preview not working on all our sites here
https://our.umbraco.com/forum/umbraco-7/using-umbraco-7/74377-403-error-on-preview https://our.umbraco.com/forum/umbraco-7/using-umbraco-7/61450-Preview-gives-internal-server-error
I'm now at a 403 for any Preview items. Since I'm out of options I thought I'd check here. I'm not running Umbraco from source, is there any way I can set the UseUmbracoPreviewAuthentication elsewhere? In a startup handler perhaps?
I'm not 100% sure when Preview stopped working, but we have about 10 sites on 7.12 and none of them are able to Preview. We only found out about it from a client that told us how great Wordpress preview was (lol ugh).
I do have some rewrites for force-www/https but I've removed those and had the same result
-Marc
Try deleting the Umbraco\Preview folder if it exists in the solution
Hello guys,
I am facing the same issue that page is not getting previewed but my case is a little bit different. Preview functionality is working when the page is published but at the same time when I am unpublishing the page then the preview function is not working. Also when I try it refreshing 4-5 time then it appears for once but again if I am refreshing the page then the page shows a 404 error. Load balancing is implemented on the server and I am not sure if it is causing the error. Can anyone help me to resolve the issue of page not getting previewed when it is unpublished and saved? Any help is much appreciated.
is working on a reply...