The very first characters of the file 'sites/all/libraries/tinymce/jscripts/tiny_mce/tiny_mce.js' of version:
3_3_9:
(function(c){var a=/^\s*|\s*$/g,d;var b={majorVersion:"3",minorVersion:"3.9",releaseDate:"2010-09-08",_init:
3_3_9_1
(function(d){var a=/^\s*|\s*$/g,e,c="B".replace(/A(.)|B/,"$1")==="$1";var b={majorVersion:"3",minorVersion:"3.9.1",releaseDate:"2010-09-23",_init:
Quote from lines 74 till 95 of the file 'sites/all/modules/wysiwyg/editors/tinymce.inc':
/**
* Detect editor version.
*
* @param $editor
* An array containing editor properties as returned from hook_editor().
*
* @return
* The installed editor version.
*/
function wysiwyg_tinymce_version($editor) {
$script = $editor['library path'] . '/tiny_mce.js';
$script = fopen($script, 'r');
// Version is contained in the first 100 chars.
$line = fgets($script, 100);
// 2.x: this.majorVersion="2";this.minorVersion="1.3"
// 3.x: majorVersion:'3',minorVersion:'2.0.1'
if (preg_match('@majorVersion[=:]["\'](\d).+?minorVersion[=:]["\']([\d\.]+)@', $line, $version)) {
fclose($script);
return $version[1] . '.' . $version[2];
}
fclose($script);
}
Increasing the number of very first characters from 100 to 138, did the trick. So, like so:
$line = fgets($script, 138);
Please, can someone verify this?
Comments
Comment #1
not_Dries_Buytaert CreditAttribution: not_Dries_Buytaert commentedAlso: If it is correct (after it has been successfully tested by the community), can someone please explain how this should be committed as a patch? I am a rookie with these things, but proud to have come so far with this issue still ... ;-)
Comment #2
dokuf CreditAttribution: dokuf commentedI can confirm that the fix works.
Comment #3
not_Dries_Buytaert CreditAttribution: not_Dries_Buytaert commentedI guess, this legitimates a status change. Anyone care to build the patch or explain me how to build one?
Comment #4
TwoDThanks for reporting this, but it has already been fixed in the -dev snapshots. See #695398-37: Support for TinyMCE 3.3.
How to create patches can be found at http://drupal.org/patch/create
Comment #5
TwoDWhoops.