Download & Extend

Geting version error wehn trying to install TinyMCE

Project:Wysiwyg
Version:6.x-2.0
Component:Editor - TinyMCE
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

Hi,

When trying to install the latest TinyMCE version ( tinymce_3_3b1 ) I get:
The version of TinyMCE could not be detected.

The problem is that the fgets() is not reading everything it needs.
So I changed it to 100 chars at the file sites/all/modules/wysiwyg/editors/tinymce.inc
$line = fgets($script, 100);

Cheers,
Miki

Comments

#1

Here is the diff file

AttachmentSize
fix_tinymce_version_problem.patch 664 bytes

#2

I just wanted to confirm the bug (and the fix). Thx.

#3

Status:active» closed (duplicate)

Please search the issue queue before reporting new issues, this is a duplicate of #695398: Support for TinyMCE 3.3.
You can follow up on the progress and help testing in that issue and the fix will most likely be released with Wysiwyg 2.1.

#4

Well, I actually did search for a cure to the version erro but couldnt find it.

So, i opened this issue.
Who ever posted that issue forgot to mention the error which most people use as a search string.

#5

Michael, thanks for posting this. It helped me today.

#6

Thanks Miki - that worked great for me too.

#7

Thanks, this helped me a lot.
I manually changed that line, thinking it easier than applying the patch :p.

#8

thanks for the fix

#9

To everyone applying just the "fgets 80->100" fix:
This version of TinyMCE brought a new 'Advanced Link' plugin, and it removed the 'Safari' plugin. The patch in #695398: Support for TinyMCE 3.3 accounts for this as well as fixing a problem with the base path, so please apply that one instead.

#10

Status:closed (duplicate)» patch (to be ported)

Any chance this patch can be applied to dev release so this doesn't have to be manually done every time module is downloaded?

#11

Status:patch (to be ported)» closed (duplicate)

This patch will not be applied anywhere. See #9 for a correct patch which compensates for changes in the editor, it will be committed when it's done and confirmed to be working.

#12

Again, thanks for the fix.

#13

Gold absolute Gold....4am and it wasn't working....thanks a BUNCH!

#14

Thanks for that Miki, works with the patch!

#15

Change mine to 200 instead of 100, worked fine.

#16

I just wanted to confirm that I also had to change the value from "100" to "200" and the editor is now being recognized in the wsiwyg module.

I download the Version: 3.3.9.1 of TinyMCE, fyi.

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, 200);                                         //<----------Change here!!!
  // 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);
}

#17

This is fixed in CVS, and I think -dev snapshots were just updated too.

#18

Just confirming, I too received the error message: The version of TinyMCE could not be detected. Running:
Drupal 6.19
WYSIWYG 6.x-2.1
TinyMCE 3.3.9.1

[for 'semi-active' users] Installing the WYSIWYG dev version fixed it: 6.x-2.x-dev (2010-Sep-25). Noted here too: #695398: Support for TinyMCE 3.3.

#19

#16 worked for me

#20

thanks, change to 200 worked for me at http://joomlatalk.com :)

#21

#16 worked for me. I tweaked it further and found changing it to 110 works as well.

#22

TinyMCE 3.3.9.2 required that I change the value to "200"...
Thanks for the hint.

#23

Guys, like I said in #17, the fix for this has been in the -dev snapshots for a while now. No need to comment here. ;)

#24

Maybe make a new minor release then since this is a show-stopper bug ...

#25

Yes, we will, soon. But this is not a show stopper IMHO. Just switch to an earlier version of the editor, or the -dev version of Wysiwyg if you really need the latest version of the editor.

Or if you don't like runnin a non-stable version of Wysiwyg (though -dev is probably a lot more stable than 2.1), apply the patch manually, it's a simple change which takes minimum effort.

#26

I just wanted to confirm that I also had to change the value from "100" to "200" and the editor is now being recognized in the wsiwyg module.

It works for me... thanx for he help..

#27

Status:closed (duplicate)» active

Thanks .. changed file in sites/all/modules/wysiwyg/editors/tinymce.inc to 200 worked fine after hours of trying to follow the tinymce instructions.

#28

Status:active» closed (duplicate)

#29

I just had to change this from 100 to 200 also. Looks like they're moving the version information further and further down with each new release of TinyMCE. I just installed 3.3.9.2.

#30

@#16, wanted to confirm setting it from 100 to 200 worked for me as well. Thanks for this fix!
$line = fgets($script, 200);

tinymce 3.3.9.2

#31