Sitecore - Handle 500 errors separately per site in multisite setup - sitecore

We're running Sitecore in a multi-site configuration and currently have custom 404 pages for each of our sites.
What we would also like is to have custom 500 pages for each site. I haven't found much on how that works (if it does) in Sitecore, and was hoping the community had some insight into how to set up custom 500 pages in a multi-site Sitecore setup. Currently, we have one 500 page the two sites share. This is fine in development, but in production we don't want to expose the fact that these sites share the same box.

Well as per my knowledge, what you can do is you can directly set a URL to be executed (.i.e. it goes to your common Custom Error Page), where you decide the site-specific error details to be shown.
Considering that you are using IIS 7.0 or 7.5, please follow the steps as below:
Open IIS Manager
Go to your Site, in the Sites Section.
Click on Error Pages in the IIS Section.
Next, you will move to the Error pages set by IIS. Go to Error code 500, select it and click on Edit in Actions Pane.
Now select the option of Execute a URL and select a common page, say /sitecore/MyErrorPage/500ErrorPage.aspx and then, handle site-specific error messages in that particular page.
Hope this Helps!
Regards,
Varun Shringarpure

A 500 error is a server error so Sitecore can't process it. It should be a generic flat HTML file configured is IIS or the web.config

You can override the processor "Sitecore.Pipelines.HttpRequest.ExecuteRequest, Sitecore.Kernel" to handle Sitecore error like item not found, layout not found etc. See more details here: http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2013/04/Handling-Errors-in-the-Sitecore-ASPNET-CMS.aspx
But when handling 500 errors you should do it outside of Sitecore, think about what happens if you serve your 500 error page in Sitecore but Sitecore is down due to for example sql connection issues or timeouts? Your users will end I a redirect loop.

Take a look at the Error Module on the marketplace. I think it will give you want you want.

Related

Can I limit the displaying of Django's Page not found?

When I develop Django websites, I always develop them on a server that sits on the Internet in order to mirror my production environment (I run macOS locally but my servers are Linux). During development I also will set DEBUG = True for debugging purposes. The problem is that if I or anyone else who's poking around on my site enters an invalid URLconf string, Django displays the "Page not found (404)" page along with all valid URL patterns, which I feel is a bit of a security risk. For example, my custom URL for the Django admin site is listed there. Is there a way to disable the showing of this specific error page when I have DEBUG set to True or perhaps to limit its display to particular IP addresses?
you can override the default 404 view.
Read here to know how to do

Init.js failed to load in sharepoint 2013

I get the Init.js failed to load error when I click on the Share Point link.
It looks like there is some issue in loading the page.enter image description here
If you have any scripts running globally via the master page or specifically on that page - disable them first.
If you have any solution (your custom code / feature) running on your SharePoint, go to site settings >> site features (or site collection features in site collection settings) and disable it.
Then, open the page in browser debugger (F12 in browser) and in "exception behavior" choose "break on all exceptions".
This will show you exactly where the error occurs.

Sitecore menu items not working - javascript errors

So I'm just starting to work in sitecore and for some reason none of menu options are working in Page Editor mode for the site that I'm working on. We pretty much have the sitecore website and add some extra page content (MVC app files) to it. I'm getting a variety of javascript errors.
In content Editor, if I click the Sitecore logo and click on Properties I get
TypeError: contentIframe.dialog is not a function
In page editor if I click on the blue components button I get:
TypeError: i.widget is not a function
I'm guessing maybe it's a conflict between jquery that we're using for this website and whatever Sitecore is using. I think it's 7 - but I can't see it via the menu option :)
That guess could be wrong - it could in fact be a browser issue, but I've ensured Firefox is not blocking popups. It doesn't work in Firefox, IE or Chrome though.
The weird thing is that no one else on the project is having this issue it's only on my computer.
Edit - I've also just tried re-installing (7.2) without any local code changes I still can't click on a page and go to Presentation, Details (Layout) - I get a TypeError: contentIframe.dialog is not a function
Edit 2 - I've noticed that I can use sitecore in the QA environment and the dialogs work fine there. So it's something specific to my local build of the site we have (sitting on top of sitecore). But the dialogs just throw jquery errors when I do stuff locally. I was hoping it would be a browser setting but doesn't look like it.
Edit 3 - What I've tried this morning.
Same thing happens in all browsers (FF, IE, Chrome) and I’ve cleared
my browser cache I can access the QA site and the dialog appears as
expected
Copied across the QA site files, pointed my local Digital
site in IIS to the new folder – dialogs don’t work
Team member tried accessing the site from his machine (pointing to my IP address) and
dialogs work for him
I tried seeing if another local sitecore site dialogs were working – but the menu items for that are opening as new windows (so I’m guessing it’s a sitecore 7.2 feature that they appear as jquery dialogs??)
So after googling for rejected-by-urlscan it turns out there's a program called UrlScan from microsoft that was blocking my dialogs. Uninstalled that and I now have dialogs appearing for sitecore. Very exciting :)
I guess it is a problem with some browsers plugin. Sitecore is sensitive to scripts that are used(different versions of jquery or prototype.js). Plugins can inject scripts to HTML source of pages and it can cause errors.
Try to switch off all plugins at least at one browser and check the results.

ColdFusion: cftooltips display on one site but not another on same server

I just deployed a new site, call it SiteA, that uses cftooltip, but the tooltips are not displaying. When I hover over the link, nothing happens. SiteB has been running on the same server for a long time, and it's tooltips display fine. The folders for SiteA, SiteB and CFIDE are all in inetpub/wwwroot.
My browser reports the following when trying to display tooltips on SiteA:
'ColdFusion is undefined'
'YAHOO' is undefined.
It would seem that SiteA can't find what it needs in cfide/scripts, but SiteB doesn't have this problem. In the CF Admin, I have a mapping to cfide.
Any ideas? Thanks in advance for help.
Peter
It's not exactly a solution, but you can cut and paste the CFIDE/scripts folder into the webroot of SiteA, which should at least get it working until you work it out!
Things to check are the mappings (obviously), but also any URL rewriting etc; look into chrome dev tools or firebug to see what is being returned from the missing .js call (i.e is it an IIS or apache 404, or something else?)

Can't Open Web forms for marketers Form Designer or Security Manager

I have had WFFM running on a Sitecore instance for a while, but it has recently stopped working. When I go to "Form Designer" on an existing form, I get the standard Sitecore "The requested document was not found" page.
Requested URL: /applications/modules/web
User Name: sitecore\admin
Site Name: shell
If the page you are trying to display exists, please check that an
appropriate prefix has been added to the IgnoreUrlPrefixes setting in
the web.config.
Note that the requested URL is stated as /applications/modules/web instead of /applications/modules/web forms for marketers.
A lot of development has occurred on this site recently, so I'm not sure when exactly this started happening.
Additional: info:
Folder and file permissions are correct.
I've tried reinstalling the WFFM package, and made sure that all the files are in place.
Several processors have been added to the HttpBeginRequest pipeline, but I removed them all to test if they were the cause - they weren't.
I haven't upgraded Sitecore since WFFM was working and the version is correct.
No errors are logged
EDIT
This also seems to be affecting the Sitecore Security Editor:
Requested URL: /appl
User Name: sitecore\admin
Site Name: shell
If the page you are trying to display exists, please check that an
appropriate prefix has been added to the IgnoreUrlPrefixes setting in
the web.config.
EDIT 2
Further investigation with this is making me think it is related to the Requested URL. I originally thought the the "Not found" page was displaying the requested url incorrectly. However, if I attempt to goto mysite.com/sitecore/shell/applications/fake folder with spaces/fake page with spaces I get this error message:
Requested URL: /applications/fake folder with spaces/fake page with
spaces
User Name: sitecore\admin
Site Name: shell
If the page you are trying to display exists, please check that an
appropriate prefix has been added to the IgnoreUrlPrefixes setting in
the web.config.
As you can see the Requested Url is correct in the error message. So in relation to my problem, I think maybe Sitecore is requesting the wrong URL in the first place.
Additionally if I go to the go the following url by typing directly into the browser, then the Security Editor opens as expected:
mysite.com/sitecore/shell/Applications/Security/User-Editor
This is quite old now but I thought I'd provide an update for anyone else who encounters the problem.
Unfortunately, Sitecore support weren't able to help beyond pointing out that setting the addAspxExtension attribute to 'true' in the link provider seemed to solve the problem. This may have been acceptable except that extensionless URLs were important to the customer.
In the end I had to amend my link provider so that addAspxExtension is set to 'true' in the web config, and then I set it to false inside the GetItemUrl method for specified sites only.
So now whenever the context site is 'Shell' or 'Admin' etc, the extensions are added by default, but switched off in my main website.
Of course, this is a work around. I still don't know how to actually fix the problem
So the first thing that I am going to tell you is that I suspect that there is something wrong with your site declaration for Sitecore Modules. In your web.config, there's a site declaration for "modules_shell" and "modules_website". Those are where the code files that run the modules are usually located... a shell folder to run the parts that run in the Sitecore shell and a web folder to run the part that is accessed by the externally facing site. Please check your site declarations (and the form.config file) to make sure that you're not in live mode or something like that. I would definitely say that this is where you should start looking.
The next thing is to say that your comments about Sitecore not serving a url in the /sitecore/shell directory is really not surprising. Sitecore processes all requests unless you specifically tell it to ignore requests (like setting it in the IgnoreUrlPrefixes in web.config), it's going to try processing it. Like going to /sitecore/shell/applications gives me a layout error because it doesn't have anything set to handle that request. Now your error suggests that there is something wrong with Site declarations.. however, even if they were all right, it still wouldn't work.