While working on a project for one of our customers, we have stumbled on a quite odd error. While editing text in the Content Editor Web Part (CEWP) we got a JavaScript error on each key press.
As we have customized the SharePoint Rich Text Editor (RTE) by adding additional buttons and assets, I suspected our own extensions to be the reason of the error at first. Unfortunately, after removing the customization, the error persisted.
The error itself was quite odd: we got it while using the Content Editor Web Part only. While editing content using exactly the same RTE as a Rich HTML control there was no error. Furthermore, we received the error in the test environment only. Our development machines didn't show up any error at all!
After debugging the RTE2PUEditor.aspx page – the asset responsible of creating the instance of the RTE editor for the CEWP I have found out that it references multiple JavaScript files. After comparing these files to the one from our dev machines, I have found out that one of them – LAYOUTS\1033\BFORM.JS was different. After replacing it with the one from our development environment, the JavaScript error disappeared.
Looking at the reason of the error and the differences between the bform.js files we have found out that it has to have something to do with different SharePoint installs we we using. While we still use the updated RTM on our development machines, we have used the slipstreamed SP1 version of SharePoint on the test environment.
Update April 16, 2008:
Replacing the BFORM.JS only doesn't solve the whole issue. While editing the content using the RTE in the Edit Form, SharePoint keeps throwing the error on each key press. In order to fix it, you have to replace the LAYOUTS\1033\FORM.JS as well.
















June 30th, 2008 at 2:50 pm
Make sure to first install WSS SP1 and afterwards MOSS SP1!!! (see http://technet.microsoft.com/en-us/office/sharepointserver/bb735839.aspx)
August 4th, 2008 at 6:56 pm
Were you actually able to replace the Rich Text Editor used with the Content Editor Web Part? We are trying to accomplish the same thing and having some difficulty figuring out how to get a 3rd part RTE to pop up when we edit a CEWP. Any tips?
thx!
August 5th, 2008 at 9:52 am
When using for example the Telerik RadEditor, you'll notice, that it's using a slightly different editing experience. Telerik uses in-place editing while the OOTB RTE uses a pop-up. Sometime in Q3 there will be another RTE available for SharePoint 2007 – the aRTE (Accessible RTE) provided by HiSoftware. I'm really curious about the editing experience it will provide and how it will integrate in SharePoint.
As for now: do you really need to replace the OOTB RTE rather than using for example the Telerik RadEditor Lite?
August 6th, 2008 at 2:16 am
Thank you very much for posting this issue. My Content Editor Webpart is now working!
November 12th, 2008 at 7:50 am
Thanks for posting this.
In addition to the BFORM.JS I have to copy over the OWS.JS file also from a working environment to get this issue fixed.
November 12th, 2008 at 8:15 am
Thanks for the update Sivaraj. I haven't experienced that myself, but then again: it might depend on the configuration of your server.
November 18th, 2008 at 11:28 am
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, and we no longer receive the errors.
April 9th, 2009 at 5:00 pm
Hey,
Am facing the same problem of ur\'s, I\'ve installed the infrastrcture updates [infrastructureupdateformicrosoftofficeservers-kb951297-fullfile-x86.exe & infrastructureupdateforwindowssharepointservices3.0-kb951695-fullfile-x86.exe] and the error started to pop-up.
I've tried to replace the Forms.js,BForms.js,and also OWS.js but the error is still popping on each key press!
Is there anything else which can be done?
I appretiate any help ASAP.
Thanks,
Fouad
May 20th, 2009 at 10:33 am
Fouad the Service pack 2 is release and it will be helpful if you install the Service pack 2 and then see if you still get the error.
http://www.ekhichdi.com/sharepoint-blogs/wss-3-0-and-office-server-service-pack-2
July 13th, 2009 at 1:02 pm
Tried SP2 installation, didn\\\'t help either.. same error on key press in rte.. I wouldnt really like to modify moss system js though
July 13th, 2009 at 6:24 pm
@alexey: While I understand your point of view, so far I heavent heard of any other solution to this issue.
July 25th, 2009 at 4:17 pm
Hi Waldek!
What do you think about switching from SharePoint default HTML editor to some other editor (Telerik, TinyMCE, or something like that)? It shouldn't be technically complex.
July 25th, 2009 at 11:05 pm
@Gunnar Peipman: while it's definitely possible and something I've done a couple of times myself, it all depends on the requirements. Some customers might just want to stick to the default RTE.
January 3rd, 2010 at 1:58 pm
thanks Waldek,
it's working fine now, we have to delete all temporary files and cookies used in IE after replacing the files.
January 3rd, 2010 at 2:05 pm
@mdarwish: thanks for getting back on it. Great to hear it's working.
February 11th, 2010 at 8:32 pm
Well..I dnt even have .js files at that path?But its still giving an error :
Invalid argument: \layouts\1033\html.js