Bug #5752
Firefox 17 update breaks FCKeditor online WYSIWYG editor
100%
Description
Upgrading Firefox to v17 has generated a change in the User-Agent string, which is used by several JavaScript applications to try and locate browsers capabilities.
This change, from something like this:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0
...to something like this:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0
(as reported here: https://groups.google.com/forum/?fromgroups=#!topic/mozilla.engagement.developers/jzdH7q4JhoM)
breaks this detection by FCKEditor. As such, it will stop working when you use it with Firefox 17 (as reported here: https://support.mozilla.org/es/questions/942438 )
To fix this, the code of FCKeditor should be updated to suit the change. Locate the main/inc/lib/fckeditor/fckeditor.php file and go to line 61. Change this code:
else if ( strpos($sAgent, 'Gecko/') !== false ) { $iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ; return ($iVersion >= 20030210) ; }
to this code:
else if ( strpos($sAgent, 'Gecko/') !== false ) { $iVersion = substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ; if ( preg_match('/^\d{2,3}\.\d{1,4}\s/', $iVersion) ) { return true; } $iVersion = (int)$iVersion; return ($iVersion >= 20030210) ; }
This hasn't been tester in production yet (couldn't find a FF17 around), so please report if it works for you.
Files
Associated revisions
Tentative fix for the FCKeditor detection flaw for Firefox 17 - added comment - refs #5752
History
Updated by Michela Mosquera over 9 years ago
- File despues-F17.png despues-F17.png added
Prueba de Mozilla 17: FUNCIONA!
Updated by Michela Mosquera over 9 years ago
- File error-fie10.png error-fie10.png added
Adjunto pantalla como estaba antes del arreglo:
Updated by Jan Derriks over 9 years ago
Isn't it great that when a highly respected teacher emails me a problem with announcements, the answer is posted here 16 hours earlier?
Thanks Yannick, works fine with FF17 on windows[7-8].
Updated by Juan Carlos Raña Trabado over 9 years ago
We should check this too
http://code.google.com/p/chamilo/source/browse/main/inc/lib/browser/Browser.php
Updated by Alain Deschênes over 9 years ago
Version chamilo-1.9.4-nightly-2012-11-23 testé sur mon serveur avec Firefox 17.0 et tout fonctionne normalement.
Updated by Alain Deschênes over 9 years ago
J'ai trouvé un peu plus simple:
../main/inc/lib/fckeditor/fckeditor.php
Remplacer à la ligne 62
return ($iVersion >= 20030210) ;
par
return ($iVersion >= 13) ;
Et le tour est joué,
Alain
Updated by Marc De Caluwé over 9 years ago
Solution works perfect in Firefox 17 on Ubuntu. Thanks a lot!
Updated by Yannick Warnier over 9 years ago
- Status changed from Assigned to Bug resolved
- % Done changed from 0 to 100
Firefox 17.0.1 has fixed the problem anyway, by returning to the previous user agent style.
Tentative fix for the FCKeditor detection flaw for Firefox 17 - refs #5752