When using Drupal 6's built-in JavaScript compression, TinyMCE for WYSIWYG completely fails to load for me (and also breaks all the other JS on my TinyMCE-enabled pages). This patch is a port of the fix in http://drupal.org/node/274030 (for the TinyMCE module) to the WYSIWYG module. Seems to be doing the job for me. Hoping this can get committed soon, because it's needed urgently.

CommentFileSizeAuthor
wysiwyg_js_nocompress.patch1.17 KBJaza

Comments

sun’s picture

Priority: Critical » Normal
Status: Needs review » Postponed (maintainer needs more info)

That can only mean you're using TinyMCE 2?

tinymce.inc already defines preprocess => FALSE in case of TinyMCE 3.x for this purpose:

      '2.1' => array(
        // 'include files' => array('tinymce-2.inc'),
        'js files' => array('tinymce-2.js'),
        'css files' => array('tinymce-2.css'),
        'download url' => 'http://sourceforge.net/project/showfiles.php?group_id=103281&package_id=111430&release_id=557383',
      ),
      '3.1' => array(
        // 'include files' => array('tinymce-3.inc'),
        'js files' => array('tinymce-3.js'),
        'css files' => array('tinymce-3.css'),
        // 'plugin callback' => 'wysiwyg_tinymce_3_plugins',
        'libraries' => array(
          '' => array(
            'title' => 'Minified',
            'files' => array(
              'tiny_mce.js' => array('preprocess' => FALSE),
            ),
          ),
Jaza’s picture

Status: Postponed (maintainer needs more info) » Needs work

Nope - all recent versions.

TinyMCE: 3.1.0.1
WYSIWYG: CVS HEAD (or "2.x-dev")
Drupal: 6.11

Perhaps the bug, then, is that the 'preprocess' attribute in the array in tinymce.inc (as you pasted above) isn't getting used properly. My patch fixes the problem, but you're right, my patch shouldn't be needed.

sun’s picture

Status: Needs work » Postponed (maintainer needs more info)

well, I'm correctly getting:

<script type="text/javascript" src="/files/js/acc5aa90a66fb0c0a50aba87000e4dc9.js"></script>
<script type="text/javascript" src="/sites/all/modules/wysiwyg-HEAD/tinymce/jscripts/tiny_mce/tiny_mce.js?E"></script>
sun’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Sorry, without further information this issue can only be marked as won't fix.

Feel free to re-open this issue if you want to provide further information. Thanks.

cindyr’s picture

I'm using IE7, WYSIWYG 6.x-2.1 and TinyMCE 3.3.5. Without the above patch, the page continues to try to load indefinitely. With the patch, the page loads (yay - thanks, Jaza!). Either way I have only one custom (Footnotes) button and no other buttons, but I'm hoping that issue is addressed elsewhere...

vinmassaro’s picture

Version: 6.x-1.1 » 6.x-2.3

I am running into this issue now with:

Drupal 6.16
WYSIWYG 6.x-2.3
TinyMCE 3.4.2

I will randomly get node edit pages trying to load indefinitely. These will take a few minutes to load and when they finally do, the compressed javascript is not loaded.

One way I can reproduce this half the time is to go to a node edit page and then flush the Drupal cache via Admin menu. I took a look at the generator in Live HTTP Headers in Firefox and can see that the get requests stop every time on the compressed javascript file. If I let it sit for a few minutes until the page finally loads, I get no javascript (fieldsets are all open, no buttons appear in TinyMCE, etc). Kind of at a loss as to where to go next with this.