Hi,

I just had to upgrade from the TinyMCE module to WYSWYG. A very simple process, I might add.

I ran into a problem, though, which seems tinyMCE specific. When the page loads, the WYSIYWG editor doesn't load. Checking the log I get the following error: Error: this.contentWindow is undefined

The curious thing is that if I Disable rich-text (the same error appears again here), then re-enable rich-text again, the editor loads fine, and the error doesn't re-appear until the next page-load.

This happens both in Safari 3.2.1 as well as Firefox 3.0.7
I'm using WYSIWYG 5-1.1 and TinyMCE 2.1.2

Any thoughts? Is the drupal related, or is it TinyMCE specific?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moonray’s picture

Additional info:

The version of TinyMCE we were running before the module switch was also 2.1.2. It broke due to an upgrade of jQuery Update module. I'm guessing this issue is related to jQuery somehow as well.

moonray’s picture

Looks like it's an incompatibility with the settings saved by the old TinyMCE module.

If I edit and submit each profile on http://dia/admin/settings/wysiwyg/profile the error goes away.

So, the migration code probably needs a bit of looking at.

sun’s picture

Title: Error: this.contentWindow is undefined » Migration path from TinyMCE not completely working (this.contentWindow is undefined error)
Priority: Critical » Normal

Can you post your old tinymce profile configuration, please?

moonray’s picture

FileSize
159.94 KB
60.44 KB
82.38 KB
65.91 KB
123.99 KB

Find screenshots attached.
Plus this is the php for the visibility:

<?php
//see http://drupal.org/node/72940#comment-800975
    $match = false;
    $blacklist = array('simplenews', 'catalog_splash', 'catalog-splash', 'hot_trend', 'hot-trend', 'global_souk', 'global-souk');
   
//check for node-edit
if (arg(0) == 'node' && is_numeric(arg(1))) {
    $node = node_load(array('nid' => arg(1)));
    if (!in_array($node->type,$blacklist)) {
        $match = true;
    }
}

//check for comments
$url = request_uri();
if (strpos($url, "comment")) {
  $match = true;
}

//check for user page,
$url = request_uri();
if (!(arg(0) == 'user' && arg(1) == 'register') && strpos($url, "user")) {
  $match = true;
}
  
//check for node-add
if(arg(0) == 'node' && arg(1) == 'add') {
    if(!in_array(arg(2),$blacklist)) {
        $match = true;
    }
}

return $match;
?>
sun’s picture

Thank you. Just an idea: Could you also post an export of the tinymce* database tables? (only the two tables prefixed with "tinymce_", defining the profiles and user roles associations) That would make testing and fixing the migration path a lot easier. If you can, please do an _uncompressed_ SQL export and attach it here (e.g. in phpMyAdmin, go to the database; On the table overview page, select the two tables and click on the "export" icon below the table list).

moonray’s picture

My previously reported "fix" didn't quite work. The only way to get it to work flawlessly was to completely uninstall the wysiwyg module, then enable it and set ip up from scratch.

Below is my mysql output from the old tinymce setup.

mysql> select * from tinymce_role;
+----------+-----+
| name     | rid |
+----------+-----+
| Standard |   1 | 
| Standard |   2 | 
| Standard |   3 | 
| Standard |   4 | 
| Standard |   5 | 
| Standard |   7 | 
+----------+-----+
6 rows in set (0.00 sec)
mysql> select * from tinymce_settings;
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| name     | settings                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Standard | a:28:{s:8:"old_name";s:8:"Standard";s:4:"name";s:8:"Standard";s:4:"rids";a:6:{i:3;s:1:"3";i:1;s:1:"1";i:2;s:1:"2";i:4;s:1:"4";i:5;s:1:"5";i:7;s:1:"7";}s:7:"default";s:4:"true";s:11:"user_choose";s:4:"true";s:11:"show_toggle";s:4:"true";s:5:"theme";s:8:"advanced";s:8:"language";s:2:"en";s:14:"safari_message";s:5:"false";s:6:"access";s:1:"2";s:12:"access_pages";s:822:"<?php
//see http://drupal.org/node/72940#comment-800975
    $match = false;
    $blacklist = array('simplenews', 'catalog_splash', 'catalog-splash', 'hot_trend', 'hot-trend', 'global_souk', 'global-souk');
   
//check for node-edit
if (arg(0) == 'node' && is_numeric(arg(1))) {
    $node = node_load(array('nid' => arg(1)));
    if (!in_array($node->type,$blacklist)) {
        $match = true;
    }
}

//check for comments
$url = request_uri();
if (strpos($url, "comment")) {
  $match = true;
}

//check for user page,
$url = request_uri();
if (!(arg(0) == 'user' && arg(1) == 'register') && strpos($url, "user")) {
  $match = true;
}
  
//check for node-add
if(arg(0) == 'node' && arg(1) == 'add') {
    if(!in_array(arg(2),$blacklist)) {
        $match = true;
    }
}

return $match;
?>";s:7:"buttons";a:15:{s:12:"default-bold";s:1:"1";s:14:"default-italic";s:1:"1";s:17:"default-underline";s:1:"1";s:19:"default-justifyleft";s:1:"1";s:21:"default-justifycenter";s:1:"1";s:20:"default-justifyright";s:1:"1";s:15:"default-bullist";s:1:"1";s:15:"default-numlist";s:1:"1";s:12:"default-undo";s:1:"1";s:12:"default-redo";s:1:"1";s:12:"default-link";s:1:"1";s:14:"default-unlink";s:1:"1";s:15:"default-cleanup";s:1:"1";s:17:"emotions-emotions";s:1:"1";s:17:"font-formatselect";s:1:"1";}s:11:"toolbar_loc";s:6:"bottom";s:13:"toolbar_align";s:6:"center";s:8:"path_loc";s:6:"bottom";s:8:"resizing";s:4:"true";s:13:"block_formats";s:19:"p,h1,h2,h3,h4,h5,h6";s:11:"verify_html";s:4:"true";s:12:"preformatted";s:5:"false";s:22:"convert_fonts_to_spans";s:4:"true";s:17:"remove_linebreaks";s:4:"true";s:23:"apply_source_formatting";s:4:"true";s:11:"css_setting";s:4:"self";s:8:"css_path";s:16:"%h/%t/tinmce.css";s:11:"css_classes";s:0:"";s:2:"op";s:14:"Update profile";s:10:"form_token";s:32:"bd6f1827f0912acf13d32b77926afa0e";s:7:"form_id";s:26:"tinymce_profile_form_build";} | 
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.02 sec)

(sorry, didn't have access to a phpmyadmin type interface)

moonray’s picture

Priority: Normal » Critical

I've marked this issue as critical. No matter what I've tried, I couldn't get it to work properly.
Reverting to tinyMCE and applying the following pathc got it to work perfectly. http://drupal.org/node/235972#comment-882611

Until this is resolved, wysiwyg is not a usable module.

shaisachs’s picture

I am having a similar problem in FF2, FF3, and Safari on the Mac. For the most part I don't see the problem in FF 3 on the PC, but it does show up there from time to time (immediately after deleting/setting up a profile, or when I hard refresh a page using control F5). I think this is also preventing me from saving links, because if the editor shows up fine when I first load the edit form, then I can create links with no trouble. But if I have to click Disable a coupe of times to get it to load, the links don't save.

Relevant details:
Drupal 6.9
TinyMCE 2.1.3
Wysiwyg API 6.x-1.x-dev as of about 2009-04-20 7:45 am

Also using IMCE 6.x-1.1, along with the IMCE Wisywyg bridge module, v. 6.x-1.0

sun’s picture

Version: 5.x-1.1 » 6.x-2.0-alpha1
Status: Active » Needs review
FileSize
2.77 KB

Re-considered: We just remove the migration path. tinymce module is old. People who did not migrate yet, have to install from scratch (like everyone else).

sun’s picture

Status: Needs review » Fixed

Thanks for reporting! Committed to all branches.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.