Try our conversational search powered by Generative AI!

"View on Website" link gives 404 error when pages other than start page are viewed

Vote:
 

I get a 404 error for pages other than start page when the "View on Website" link is clicked.

Is there way to resolve this ?

Any help would be highly appreciated

#279400
Apr 28, 2022 13:55
Vote:
 

If you are running on DXP, can you open the log stream and look for any errors?

#280235
May 12, 2022 18:02
snehjadh - May 16, 2022 6:56
Hi Kenny,

Yes, it gives error in UrlService but since this error occurs only in Production site. Its difficult to debug in local. Its not reproducible in other environments Edit mode
KennyG - May 17, 2022 13:51
You said UrlService gives an error. What is that error?
Vote:
 

Couple of things you can try. Depending on your experience, you may just ignore me:

  • pages you are trying to view, are they published?
  • What language has the page been created in and is that the language setup against the site in 'manage website?'
  • How are your controllers and views setup in the code against the page type you've created? Can you download the alloy cms site and compare your MVC structure?
#280237
May 12, 2022 22:19
snehjadh - May 16, 2022 6:59
Hi Surjit,

The pages are published. View on website worked fine in March. It gives 404 from April onwards although nothing has been changed in Manage Website
Vote:
 
  1. Is the site domain set up correctly in manage websites in admin mode? 
  2. Can you browse content on the front end normally? If so can you compare the URL generated at the front end compared to the one you get with the "View on website" link
#280288
May 13, 2022 14:47
snehjadh - May 16, 2022 7:07
Hi David,

Yes the domain is correctly set in Manage website as it was working until March. There hasn't been any changes done for the error to pop.
We can browse the content on front end. The URL with Type Edit is set in the Edit mode which throws Error when View on Website is clicked. This Edit mode URL works fine when language is added in URL eg. https://edit-prd.abc.com/en/contactuspage
Daniel Ovaska - Jun 22, 2022 12:21
Have you set the default language on the host setting and also set as primary?
Vote:
 

Hello, Are there any URL intercepters included after March? Can you check if this was set to child tree components other than the root. It sounds like if start page is working then this shouldn't be a problem with domain configuration. Since this is happening only for child components, Are there chances if pagetypes were changed with no view file? Is this redirecting them to somewhere else?

#280375
May 16, 2022 11:08
Vote:
 

Another problem could be if the StartPublish date is being manipulated with code. See the blog which mentions the scenario https://blogs.perficient.com/2022/05/13/optimizely-page-publish-options-dos-and-donts/ 

#280459
May 17, 2022 13:47
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.