Copied to clipboard

Flag this post as spam?

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


  • Vinod Nanduri 13 posts 84 karma points
    Apr 05, 2018 @ 07:39
    Vinod Nanduri
    1

    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.

  • Mark 91 posts -18 karma points
    Apr 05, 2018 @ 11:04
    Mark
    0

    Double check that you have selected a template for the page in the Info tab.

  • Vinod Nanduri 13 posts 84 karma points
    Apr 05, 2018 @ 11:11
    Vinod Nanduri
    0

    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?

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 05, 2018 @ 15:38
    Dave Woestenborghs
    0

    Hi Vinod,

    Do you have perhaps some rewrites configured in your web.config ? That could also break the preview.

    Dave

  • Vinod Nanduri 13 posts 84 karma points
    Apr 05, 2018 @ 17:26
    Vinod Nanduri
    0

    Hello Dave,

    I am accessing the preview from the master server and it does not have any rewrite rules in web.config.

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 05, 2018 @ 17:49
    Dave Woestenborghs
    0

    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

  • Vinod Nanduri 13 posts 84 karma points
    Apr 06, 2018 @ 04:26
    Vinod Nanduri
    0

    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

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 06, 2018 @ 06:13
    Dave Woestenborghs
    0

    Hi Vinod,

    I don't see anything strange in master server logs.

    What is your log level set to ? Maybe change it to DEBUG to see more information.

    Dave

  • Vinod Nanduri 13 posts 84 karma points
    Apr 06, 2018 @ 09:49
    Vinod Nanduri
    0

    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

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 06, 2018 @ 09:55
    Dave Woestenborghs
    0

    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

  • Vinod Nanduri 13 posts 84 karma points
    Apr 06, 2018 @ 09:59
    Vinod Nanduri
    0

    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.

  • Vinod Nanduri 13 posts 84 karma points
    Apr 09, 2018 @ 08:34
    Vinod Nanduri
    0

    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.

  • Vinod Nanduri 13 posts 84 karma points
    Apr 11, 2018 @ 08:02
    Vinod Nanduri
    0

    Hello guys,

    Please let me know if someone can help me on this ?

    Vinod Nanduri

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 11, 2018 @ 08:27
    Dave Woestenborghs
    0

    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

  • Vinod Nanduri 13 posts 84 karma points
    Apr 11, 2018 @ 08:38
    Vinod Nanduri
    1

    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.

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 11, 2018 @ 08:50
    Dave Woestenborghs
    0

    Nice to hear you tracked down the issue

    Dave

  • M N 125 posts 212 karma points
    Dec 14, 2018 @ 18:49
    M N
    0

    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

  • Dave Mason 14 posts 94 karma points
    Apr 01, 2019 @ 16:31
    Dave Mason
    0

    Try deleting the Umbraco\Preview folder if it exists in the solution

  • Deepak Kumar 5 posts 75 karma points
    Jun 18, 2020 @ 09:53
    Deepak Kumar
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft