Skip to main content
12 votes
Accepted

Sitecore.Diagnostics.Log.Error() method is not working Inside a Static Class

Actually, recommended practice would be to use a Namespace as your logger, as opposed to new object() or anything else. Just using "YourLoggerName" would not be flexible enough to allow admins to ...
Mark Cassidy's user avatar
  • 25.3k
9 votes
Accepted

How do you write a Custom 404 page that is compatible with SXA?

Since you are using SXA, the module provides OOTB error handling settings which allow you to set site specific 404 and 500 pages. I couldn't find any linked documention on the Sitecore site but you ...
jammykam's user avatar
  • 13.8k
7 votes

handling 500 errors in sitecore 9

The error handling for Sitecore 9 is the same as Sitecore 8.x For me, I like to have my error pages as html pages so that it wont cause a loop if I have a serious issue. Here I remove all the ...
Chris Auer's user avatar
  • 13.1k
6 votes
Accepted

Status Code 200 returned for 404 page SXA website

The Pipeline solution is for the core Sitecore or non-SXA sites. In SXA you can set the pages directly by putting/selecting the pages with its out of the box feature. This is how you do it. Create ...
Sitecore Sam's user avatar
  • 1,163
6 votes

Sitecore SXA 500 custom error page not working

Assign 404 and 505 pages in your settings, by selecting the relevant pages by going /sitecore/content/{Environment}/{DemoSXASite}/Settings/ in the "Error Handling section" For the 500 page you have ...
Sitecore Sam's user avatar
  • 1,163
5 votes
Accepted

Replacing 404 errors with 410 Sitecore 7.2

You certainly could, but it requires a couple moving parts: Track the pages when they are deleted so you can look them up later To know whether a requested URL used to exist or not, you'll need to ...
Dan Sinclair's user avatar
  • 5,395
4 votes

How do you write a Custom 404 page that is compatible with SXA?

Step-1: First create a pipeline that is overridden to "Sitecore.XA.Feature.ErrorHandling" which comes under "httpRequestBegin" <configuration xmlns:patch="http://www....
pawan Tyagi's user avatar
4 votes
Accepted

Setting up custom 500 error page on SC 9.1

I worked with @sitecorepm on Slack to run a few tests. Why It Fails If Sitecore has not been previously initialized the custom error page will not appear. Failed Test Using Habitat 9.1.0 Stop SQL ...
jrap's user avatar
  • 4,951
2 votes
Accepted

"WARN Request is redirected to document not found page" message shown in the log file

Is there actually a "problem"? The log warning is just telling you that someone tried to browse to /login.aspx (which apparently doesn't exist on your site, which is fine), and Sitecore responded with ...
Conrad Albrecht's user avatar
2 votes

Is it possible to add Custom 403 Error page in Azure Web Apps

For the case of Error 403 - This web app is stopped. - this is not easily possible since it is actually the built-in Azure load balancer that is serving the error, not the WebApp or Sitecore. You can ...
Mark Gibbons's user avatar
  • 5,642
2 votes
Accepted

Autogenerate Sitecore 500 static pages on publish:end and publish:remote:end

Akshay we do something similar to this (for a different use case to 500 errors) but instead of publishing out actual pages we instead write Json files out to the server which store the content for the ...
Adam Seabridge's user avatar
1 vote

404 error handle in Sitecore SXA

Try changing the name of the custom error page to something else, e.g., 404-error. Sitecore has a default error page with the same name.
Sanil P's user avatar
  • 11
1 vote

Prevent Login Redirect on 403 When an Ajax Call

First Approach(Recommended) If you want to make centralizer authentication/authorization logic for any API methods then implement authentication/authorization filter, Here below sample example we are ...
Abhishek Malaviya's user avatar
1 vote
Accepted

How to support custom 404 Pages while keeping Languages.AlwaysStripLanguage set to false

TL;DR Change this line of code in the CustomExecuteRequest: var notFoundUrl = _baseLinkManager.GetItemUrl(notFoundItem); To this: var notFoundUrl = _baseLinkManager.GetItemUrl(notFoundItem, ...
Villanite's user avatar
1 vote

SXA server error page not working in Azure PaaS

There is now official documentation for this available here. However I will extend it with some extra steps that I think are needed. I've tested with 9.0.2 and SXA 1.7.1, as well as with 9.1.0 and SXA ...
Mark Gibbons's user avatar
  • 5,642
1 vote

Sitecore SXA 500 custom error page not working

@Rachit, I got same error when I tried to generate static error page. After looking at logs, the sitecore is actually trying to use the Content Management URL for 404 and 500 error pages which caused ...
Langley Li's user avatar
1 vote

Status Code 200 returned for 404 page SXA website

thank you for this article. I Created a 404 page as you mentioned and added some component to customize content displayed. I disabled the processor to override Sitecore's default 404. I set also ...
user1032's user avatar
  • 137
1 vote

Friendly error page for Sitecore web application

You need to set the absolute path of the image in your error page, for example: <body> <img src="/assets/images/errors/errorImage.png"> </body> The reason the image works when ...
jammykam's user avatar
  • 13.8k
1 vote

Sitecore.Diagnostics.Log.Error() method is not working Inside a Static Class

You can also make use of a string for the object parameter as shown below: Sitecore.Diagnostics.Log.Error("Message", ex, "YourLoggerName"); The loggerName is the module or feature. For example, you ...
Hishaam Namooya's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible