FCKEditor Year 2010 Bug for Firefox 3.6 with ColdFusion
If you are having problems using FCKeditor on Firefox 3.6, it's due to a, lets call it a Year 2010 bug. You will see a textarea instead of the editor. This probably only exists in the ColdFusion version, I haven't checked the other versions...
The useragent for Firefox 3.6 might look like this:
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
The problem is on line 47 of fckutils.cfm located in the root of the fckeditor install:
stResult = reFind( "gecko/(200[3-9][0-1][0-9][0-3][0-9])", sAgent, 1, true );
Yes that right any gecko browser made after Jan 1, 2010 will fail to match their test.
You can change it to something like this:
stResult = reFind( "gecko/(20[0-9][0-9][0-1][0-9][0-3][0-9])", sAgent, 1, true );
That will give you another 90 years of FCKeditor use on Firefox.
Note this problem will not exist on all versions of FCKeditor, you can also pass checkBrowser=false to the FCKeditor component and it will disable this check. I tried cftextarea on CF9 and it appears to work without modification.
Note: If you don't have a fckutils.cfm file look for a similar line in fckeditor.cfc. Also in some versions of FCKeditor you might get an error stating that the variable width is not defined (due to a bug in showing the textarea).
PS: If you need a ColdFusion Spell Checker for FCKeditor or cftextarea check out Foundeo's Spell Checker Product.
Trackbacks
Trackback Address: 737/BB115CEDD414DE540D385E4AF8049C56
Comments
On 01/21/2010 at 3:50:47 PM EST Brian Lang wrote:
1
Switch to CKEditor instead. It's a Javascript only add-on. No ColdFusion version.
On 01/21/2010 at 7:31:00 PM EST Francis wrote:
2
you just saved my life. thanks a lot for this post
On 01/22/2010 at 6:09:35 AM EST Sebastiaan wrote:
3
Yeah, we discovered this as well in all our CF8 installs and in the latest FCKEditor as well (2.65). A quick fix was all it took (change 3-9 into 0-9).
Too bad you stop @.hotmail adresses, now you cannot see my really cool Gravatar ;-)
On 01/22/2010 at 8:48:54 AM EST Pete Freitag wrote:
4
@Brian - Yes that is probably the best course of action. Have you found the migration to be simple?
@Francis - You're Welcome!
@Sebastiaan - I've changed the rule to allow hotmail addresses again, I was getting a ton of spam at one point from hotmail addresses, we'll see how it goes. You need to do more than just change the [3-9] to [0-9], you also need to the change the 0 before it.
On 01/22/2010 at 9:42:53 AM EST Sebastiaan wrote:
5
We indeed changed this in our fckutils.cfm: stResult = reFind( "gecko/(20[0-9][0-9][0-1][0-9][0-3][0-9])", sAgent, 1, true );
On 02/02/2010 at 8:05:48 PM EST Suzy Naschansky wrote:
6
Many thanks, Pete - very useful info!
On 02/03/2010 at 10:06:11 AM EST Topper wrote:
7
Thanks Pete!
On 02/03/2010 at 11:05:16 AM EST Emil wrote:
8
It doesn't work? :/
On 02/08/2010 at 4:54:26 PM EST Jake wrote:
9
Great Post! This worked perfectly.
On 02/10/2010 at 6:12:10 PM EST Pete wrote:
10
I'm having issues with cffinder since upgrading to firefox 3.6. it does not show image names or the upload button.
any thoughts.
On 02/18/2010 at 9:07:39 AM EST Adam wrote:
11
I actually had to update this in my fckeditor.cfm page not the .cfc Hope that helps
On 02/18/2010 at 11:34:54 AM EST andy matthews wrote:
12
Hey Pete...
Running CF8 locally and I changed that line in both of my instances, and restarted ColdFusion and I'm still getting the plain textarea within FF3.6.
Any ideas?
On 02/18/2010 at 11:42:41 AM EST Pete Freitag wrote:
13
@Andy - Hmm, not sure double check that you changed the regex properly. Are you using cftextarea to invoke FCKeditor, or are you invoking it directly?
On 02/18/2010 at 7:42:47 PM EST Crystal Fetterman wrote:
14
Worked perfectly. You rock Pete :)
On 02/19/2010 at 3:40:41 PM EST andy matthews wrote:
15
Pete...
Turns out I was editing the FCK instance within my JRun folders when I should have been editing a stand alone instance we manually installed. Got it working now.
On 02/19/2010 at 6:26:03 PM EST Ryan wrote:
16
rock on!!!
On 02/19/2010 at 6:36:57 PM EST Bridget wrote:
17
Pete,
Thanks for the start! I changed mine to use a regular expression of gecko/(20(0[3-9]|[1-9][0-9])[0-1][0-9][0-3][0-9]) .... because the comment above the regular expression in fckeditor.cfc says to check for Gecko ( >= 20030210+ ).
Yours will pass if the Gecko version date is 20010210 - this one won't
-Bridget
On 02/19/2010 at 6:44:00 PM EST Bridget wrote:
18
Also, note I had to change: if( arrayLen( stResult.pos ) eq 2 )
to
if( arrayLen( stResult.pos ) gt 2 )
On 02/22/2010 at 11:40:24 AM EST RS wrote:
19
Awesome, you just saved us a lot of grief.
If anyone's using an older version of FckEditor (e.g. 2.4.3), apply Pete's fix to fckeditor.cfm and fckeditor.cfc.
On 02/24/2010 at 12:40:14 AM EST Ed wrote:
20
Thanks i cut and pasted the code just as you said, works like a champ, thanks for posting. Ed
On 03/02/2010 at 5:13:25 PM EST Larry Peterson wrote:
21
Pete,
Thanks a million...you won't believe how much grief you saved me (and others)
On 03/03/2010 at 12:37:40 AM EST Mansi wrote:
22
We are using FCK editor version 2.3.2 in OpenCMS. I tried all the changes mentioned above, but am still not ablt to resolve the probelm.
On 03/03/2010 at 9:12:11 AM EST andy matthews wrote:
23
Mansi...
I had a similar problem. It turned out that I was editing the right file, but in the wrong location. My system had two instances of FCKEditor and I was editing the one that was NOT being used. Perhaps you're having a similar problem?
On 03/05/2010 at 6:33:39 AM EST Gordon wrote:
24
Hi
@Andy Matthews: where's this file ?? @Mansi: did you resolve the problem ?
TNX
On 03/05/2010 at 9:57:52 AM EST andy matthews wrote:
25
@Gordon We have a custom install of FCK Editor, rather than the one which comes with ColdFusion 8. I was working on the native version.
On 03/08/2010 at 5:23:12 PM EST John wrote:
26
For OpenCMS users, there is a second file to be changed. Besides /system/workplace/resources/editors/fckeditor/fckutils.cfm you need to make a change in /system/workplace/editors/fckeditor/editor_configuration.xml
Replace in Line 13
Gecko/200\d*
with
Gecko/20\d*
HTH John
On 03/09/2010 at 4:38:34 AM EST Gordon wrote:
27
VerY Thanks !!
It works in Opencms 6.2.3. I changed: /system/workplace/resources/editors/fckeditor/fckeditor.cfm
and
/system/workplace/editors/fckeditor/editor_configuration.xml
Gordon
On 03/11/2010 at 2:56:07 PM EST kevin L. wrote:
28
wow...thanks a million...just saved my bacon.
Post a Comment
Recent Entries
- Cache Template in Request Setting Explained
- What Version of Java is ColdFusion Using?
- ColdFusion 9 Performance Brief from Adobe
- Request Filtering in IIS 7 Howto
- J2EE Session Cookies on ColdFusion / JRun
- Hands on ColdFusion Security Training
- ColdFusion 9 Solr Vulnerability - Are you at Risk?
Too bad you stop @.hotmail adresses, now you cannot see my really cool Gravatar ;-)
@Francis - You're Welcome!
@Sebastiaan - I've changed the rule to allow hotmail addresses again, I was getting a ton of spam at one point from hotmail addresses, we'll see how it goes. You need to do more than just change the [3-9] to [0-9], you also need to the change the 0 before it.
any thoughts.
Running CF8 locally and I changed that line in both of my instances, and restarted ColdFusion and I'm still getting the plain textarea within FF3.6.
Any ideas?
Turns out I was editing the FCK instance within my JRun folders when I should have been editing a stand alone instance we manually installed. Got it working now.
Thanks for the start! I changed mine to use a regular expression of gecko/(20(0[3-9]|[1-9][0-9])[0-1][0-9][0-3][0-9]) .... because the comment above the regular expression in fckeditor.cfc says to check for Gecko ( >= 20030210+ ).
Yours will pass if the Gecko version date is 20010210 - this one won't
-Bridget
to
if( arrayLen( stResult.pos ) gt 2 )
If anyone's using an older version of FckEditor (e.g. 2.4.3), apply Pete's fix to fckeditor.cfm and fckeditor.cfc.
Thanks a million...you won't believe how much grief you saved me (and others)
I had a similar problem. It turned out that I was editing the right file, but in the wrong location. My system had two instances of FCKEditor and I was editing the one that was NOT being used. Perhaps you're having a similar problem?
@Andy Matthews: where's this file ?? @Mansi: did you resolve the problem ?
TNX
Replace in Line 13
Gecko/200\d*
with
Gecko/20\d*
HTH John
It works in Opencms 6.2.3. I changed: /system/workplace/resources/editors/fckeditor/fckeditor.cfm
and
/system/workplace/editors/fckeditor/editor_configuration.xml
Gordon



add to del.icio.us



