Matthew McDermott

Matthew is a principal consultant for Catapult Systems. A Microsoft SharePoint Server MVP, Matthew blogs about SharePoint and Microsoft technologies related to collaboration, web content management and productivity.
RSS Feed

Rich Text Editor Error - RTE2PUEditor.aspx

Today while working on an SP1 MOSS installation our content editor web part started raising an error on key down. The only difference that we could determine is that this build was part of a slipstream installation of MOSS rather than RTM, then WSS SP1 and MOSS SP1. It appears that the JavaScript files BFORM.JS and FORM.JS did not get updated by the service pack.

RTE2PUEditor

Internet Explorer Script Error
An error has occurred in the script on this page.
Line: 3032
Char: 2
Error: Object expected
Code: 0
URL: http://server/_layouts/RTE2PUEditor.aspx

After hours of searching I found this post: http://blog.mastykarz.nl/2008/04/14/javascript-error-while-entering-text-in-the-content-editor-web-part/. So I am re-posting in hopes that it will make finding the info easier for others.

The solution is to copy the JS files from a working SP1 server and copy them into \layouts\1033 and then start worrying about what else failed to update.

Posted by Matthew McDermott on Thursday, 3 Jul 2008 10:42
10 Comments | Filed under: SharePoint 2007
Bookmark this post with:        

Comments

On 04 Jul 2008 08:42, Pierre-Alexandre said:

It's also a commun error when you forget to install the wss language pack when you have only installed the moss language pack instead of both wss and moss language pack.

On 04 Aug 2008 03:20, Roi Kolbinger said:

I was the same problem and I fix it at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1037\HtmlEditor.js at function RTE2_OnKeyDown(strBaseElementID, elem) I add try-catch scope try { RTE_ToggleEnableShortcuts(evtSource); } catch (e) {} and it works... I hope help, Roi

On 04 Aug 2008 08:41, Matthew McDermott said:

The real resolution on this is to be sure that you have the Service Packs installed correctly. In one case we reinstalled SharePoint and then reapplied the service packs as we were seeing other strange behavior.

On 12 Aug 2008 09:07, BDavis said:

I encountered a similar error after installing KB951297. My error message however was "RTE_ToggleEnableShortcuts is undefined." To fix the issue, I modified ...\12\Template\Layouts\1033\HtmlEditor.js I commented out line 3031 where RTE_ToggleEnableShortcuts is called. I found another error and changed the IF statement in line 3107 that calls RTE_ShortcutsEnabled to "if (fCtrlKey)". This seems to resolve the issue and give me access to the RTF editor in the content editor webpart. Of course, I'm sure editing the js file is not the best answer, so do this at your own risk.

On 17 Sep 2008 10:33, Felicia said:

Thanks Matt and everyone this helped a ton, we ran into this after the upgrade to SP1.

On 18 Sep 2008 06:48, Matthew said:

Felicia, cool. You should recheck your assembly versions, after writing this I found more version problems and finally determined that WSS SP1 had not installed correctly. So I removed the bow from the farm and uninstalled/reinstalled MOSS.

On 18 Nov 2008 03:27, Rik said:

We ran into this very same issue after upgrading to moss2007 SP1, and have the impression this could very well be because of not having installed WSS Language packs. To fix the issue we simply did a bit-by-bit comparison of two files for each languagepack ( compared to the English files, who didn't have the error ) - ignoring language differences ofcourse. * FORMS.js * BFORMS.js No other files where modified so far.

On 27 Nov 2008 01:39, Tariq Mardawi said:

I got the same problem, when I modify the content of content editor web part in Arabic language, the javascript error appears, the main reason of this issue is I updated the WSS then MOSS with SP1 and Infrastructure update of WSS then MOSS then I installed the arabic language pack. which is wrong. I should install Arabic Language Pack then install the latest version of Service Pack (SP) and Infrastructure update of WSS and MOSS

On 04 Feb 2009 01:22, Mat said:

I applied the same fix as M. Kolbinger and it solved my problem. Thx

On 11 Apr 2009 11:52, jerald said:

I fix the problem as Roi Kolbinger said: "I was the same problem and I fix it at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1037\HtmlEditor.js at function RTE2_OnKeyDown(strBaseElementID, elem) I add try-catch scope try { RTE_ToggleEnableShortcuts(evtSource); } catch (e) {}" and it works Thanks Roi Kolbinger.

Leave a comment

Name (required)

Url

Email

Comments

Complete this section to post your comment