Fix: Content Editor Web Part Rich Text Editor Popup fails to display
This problem has been bugging me for the past 3 days and so I thought I’d be kind and document it just in case it has been causing someone else problems.
There does seem to be another post on MSDN (http://social.msdn.microsoft.com/Forums/en-NZ/sharepointcustomization/thread/90e14ff3-7003-44fd-9b4c-d9e654f7d8e1 that was showing the same issue and although the fix was related, the fixes that were specified in this post didn’t help me.
Invalid Argument in HtmlEditor.js at line 5740, character position 2
On further investigation it is this line in the HtmlEditor.js file that is causing the problem.
4: var varPartWPQ1 = WPSC.WebPartPage.Parts.Register('WPQ1','[GUID]',document.all.item('WebPartWPQ1'));
5: WPSC.WebPartPage.WebURL = 'http:\u002f\u002fsharepointurl';
6: WPSC.WebPartPage.WebServerRelativeURL = '\u002f';
After a lot of trial and error I found that it was to do with the master page and a <meta> tag within the master page’s <head> tag.
The tag causing the problem is this one:-
1: <meta http-equiv="X-UA-Compatible" content="IE=8" />
This meta tag tells IE to run in IE 8 Standards mode which seems to cause a problem with the browser when its trying to get a document item using the function document.all.item([itemid]).
For more information on the <meta> tag please see the following article on Defining Document Compatability (http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx)
The reason for this happening was actually that the master page was being ported back from a SharePoint 2010 master page to a SharePoint 2007 master page.
This tag was left in from the SharePoint 2010 master page.
I really do hope this helps someone as it drove me mad for a while.