Hia, tried to install the YUI editor with WYSIWYG today, and get this strange error where it says: "The version of YUI editor could not be detected.", even though it is downloaded and is extracted like it should, see:

http://skitch.com/vegardjo/b921b/terminal-bash-101x12

..anyone else getting this?

CommentFileSizeAuthor
#6 Modules_Wysiwyg_Editors_yui.inc_.patch632 byteskolier

Comments

tomsherlock’s picture

yes. got the same problem last night. I have Drupal 6.13. Here's the error message:

The version of YUI editor could not be detected.

Extract the archive and copy its contents into a new folder in the following location:
sites/all/libraries/yui

So the actual library can be found at:
sites/all/libraries/yui/build/yahoo-dom-event/yahoo-dom-event.js

I had installed the yui package in the correct folder.

This is similar to http://drupal.org/node/380586 . However the Wysiwyg version is different.
Suggested workarounds are http://drupal.org/node/380586#comment-1280848 and http://drupal.org/node/380586#comment-2044722 . I have not yet tried them.
Sun had applied a fix: http://drupal.org/node/380586#comment-1315932 . But the symptom appears to have resurfaced.

tomsherlock’s picture

I don't believe the first suggested workaround ( http://drupal.org/node/380586#comment-1280848 ) applies any more to yui.inc .

There is no longer a reference to 'README' and there is only one reference to wysiwyg_get_ on line 17 of yui.inc:

'library path' => wysiwyg_get_path('yui') . '/build',
tomsherlock’s picture

The second solution recommended by Mike_Waters (http://drupal.org/node/380586#comment-2044722) appears to have worked for me. Wysiwyg now recognizes the yui component as being installed.

vegardjo’s picture

Thanks Tom, that last fix did the trick for me too!

twod’s picture

Status: Active » Closed (duplicate)

Hmm, we don't need two issues about the same problem and since this was originally working in 2.0 (but got outdated) and it won't be updated, I'm marking this one as a duplicate of #380586: YUI editor: Version detection not working which is for 2.x-dev.
Please continue the conversation there.

kolier’s picture

StatusFileSize
new632 bytes

Patch for detecting the version of yui.

Index: yui.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/editors/yui.inc,v
retrieving revision 1.5
diff -u -r1.5 yui.inc
--- yui.inc	9 Jun 2009 00:18:12 -0000	1.5
+++ yui.inc	28 Nov 2009 05:38:48 -0000
@@ -69,7 +69,7 @@
   $library = fopen($library, 'r');
   $max_lines = 10;
   while ($max_lines && $line = fgets($library, 60)) {
-    if (preg_match('@version:\s([0-9\.]+)$@', $line, $version)) {
+    if (preg_match('@version:\s([0-9a-zA-Z\.]+)$@', $line, $version)) {
       fclose($library);
       return $version[1];
     }

porcupine73’s picture

Just had the same issue here. The patch above worked for me. The unpatched preg_match I think didn't like the r4 on the end of the 2.8.0r4 version number of yui.

perceptum’s picture

Yep - the patch fixed the bad preg_match for me too.

Thanks for that!

cammangels’s picture

Awesome, worked for me. Thank you!