I am having an issue with a user who has a site with a form that is throwing the error “There has been a critical error while processing the form” and the details mention “method ‘addEventListener‘ is not supported”.
In looking into this, I found this article:
https://sharepoint.protiviti.com/blog/Lists/Posts/Post.aspx?ID=81
It mentions the following:
Early adopters of Windows 8.1 and/or Internet Explorer 11 (IE11) may notice some issues when working in their SharePoint environments. I have not fully explored the bugs and nuisances caused by IE11 but discovered a particular issue with out-of-the-box (OOTB) workflows. After saving my publishing page and clicking the submit button to fire the workflow process, I’m greeted with a critical error.
The error message in full: There has been a critical error while processing the form. Click Start Over to load a new copy of the form. If this error persists, contact the support team for the Web site.Click Close to exit this message.
The error details mention that the method ‘addEventListener‘ is not supported. This threw me for a loop for a good hour or so until I realized that SharePoint 2010 Master Pages by default, and best practice, include the X-UA-Compatible tag and it is set to IE8. Shame on me – because I’ve blogged about this very thing in the past. But for some reason this has always worked in IE9 and IE10 – rendering in IE8 mode and using a function that shouldn’t be available. So why does this break using IE11 all of a sudden?
The Solution
Anyone concerned with IE11 & SharePoint 2010 (2007?) compatibility and experiencing the error message regarding addEventListener has a few choices:
1. Tell everyone on the (choose: internet, intranet) using IE11 to use compatibility mode (joke).
2. Wait for Microsoft to fix it (not recommended, and a joke).
3. Update Core.js manually in the hive (not recommended).
4. Add this little bit of code to the bottom of your Master Page, just before the closing <body> tag (recommended):
<script language=”javascript”>
/* IE11 Fix for SP2010 */
if (typeof UserAgentInfo.strBrowser !== ‘undefined’ && !window.addEventListener) {
UserAgentInfo.strBrowser=1;
}
</script>
My question is thus: Is this the best way to fix this problem? What other options exist to fix it?
Any advice would be appreciated…
Jon