Well there are many reasons for this error. But one of the causes of this error is Session Timeout.
Session Timeout? It’s Strange!! Isnt’ it? But yes, it is true. See following gif or follow the steps to reproduce it.
- Open Experience editor
2.Keep the browser idle for some time (Let the session timeout happen or you can delete the browser cookies)
3. Now try to add the component by clicking on the Component button in the New section.
4. “A serious error occurred please contact the administrator” message will be appeared.
This message misguides the content authors. Ideally user should be redirected to login page or page should display proper session timeout message instead of Error occurred message.
Well, this is a bug. Sitecore has provided a dll and a config change to solve this issue. Say thanks to Sitecore support!!!
Here are the steps to solve it:
<add verb="*" path="sitecore_expeditor_speak_request.ashx" type="Sitecore.ExperienceEditor.Speak.Server.RequestHandler, Sitecore.ExperienceEditor.Speak" name="Sitecore.ExperienceEditor.Speak" />
and replace it with the following line
<add verb="*" path="sitecore_expeditor_speak_request.ashx" type="Sitecore.Support.ExperienceEditor.Speak.Server.RequestHandler, Sitecore.Support.122942" name="Sitecore.ExperienceEditor.Speak" />
Analyzing the patch:
- In the patch, user session has been checked before any method/request call. In the config, a change is made to point to the patched dll instead of the old dll.
After applying this changes, you will find that on session timeout, user is redirected to the login page and before the redirection you can notice the Session timeout error message for fraction of seconds.
Happy Coding 🙂