Item8566: TinyMCEPlugin stops working in IE when JQueryPlugin and ZonePlugin is installed.

pencil
Priority: Urgent
Current State: Closed
Released In: 1.0.10, 1.1.0
Target Release: patch
Applies To: Extension
Component: TinyMCEPlugin
Branches:
Reported By: HolstenerLiesel
Waiting For: Main.PaulHarvey
Last Change By: KennethLavrsen
After updating several plugins including JQueryPlugin and ImagePlugin last week, TinyMCEPlugin stopped working in IE6-8. On the edit page there's an error message Unable to install TinyMCE; <META name ='TINYMCEPLUGIN_INIT' is missing.

System.InstalledPlugins shows no errors. Neither IE nor FF show JS errors. Source view of the edit page shows an intact line beginning
</div><!-- /foswikiPage--><meta name="TINYMCEPLUGIN_INIT" content="…
All plugins are up to date according to the Find more extensions page.

I'll be glad to provide further information.

-- HolstenerLiesel - 18 Feb 2010

ZonePlugin at fault here. The <meta> tag gets added to body, where IE apparently cannot process it (must be in the HEAD).

-- PaulHarvey - 19 Feb 2010

HolstenerLiesel, thank you for noticing and reporting this bug. Please upgrade to latest TinyMCEPlugin, which should fix this problem. Re-open the task if you are still affected.

I have set this task directly to "closed" because JQueryPlugin is not in core and so won't need to be mentioned in release notes.

-- PaulHarvey - 19 Feb 2010

JQueryPlugin will be core in 1.1. What exactly has been the problem and what was the content of the TINYMCEPLUGIN_INIT setting?

-- MichaelDaum - 19 Feb 2010

Changing to Waiting for Release since the TMCE was updated.

-- KennethLavrsen - 19 Feb 2010

The problem was that we had an addToHEAD() call with the following text:
<meta name="TINYMCEPLUGIN_INIT" content="$metainit" /> 
<script language="javascript" type="text/javascript" src="$tmceURL/tiny_mce$USE_SRC.js?v=$encodedVersion"></script> 
<script language="javascript" type="text/javascript" src="$pluginURL/foswiki_tiny$USE_SRC.js?v=$encodedVersion"></script>

Instead of being added to head, it got appended to body (I assume because of the <script> tags).

The problem is that our TinyMCEPlugin code ( foswiki.js or foswiki_tiny.js ) is then unable to locate the TINYMCEPLUGIN_INIT meta tag on IE browsers.

I assume this is because having <meta> tags outside of the document head makes for invalid XHTML, and so the meta tag is lost from IE's DOM when we try to scan for it.

(we shouldn't be scanning through meta tags on our own at all, it should be refactored to use JQueryPlugin conventions. Hopefully I will get to this work, also move the generic tml2html/html2tml stuff into WysiwygPlugin, where it can be used by other WYSIWYG editors - CKEditor, jwysiwyg, Wymeditor, etc).

-- PaulHarvey - 20 Feb 2010

Lack of the TINYMCEPLUGIN_INIT also affects the 1.0 branch .debs, in between revisions 6418 (last working) and 6432 (first failing 1.0 branch build). The result is no WYSIWYG editor, and fallback to a textarea. LDAP was the only non-standard plugin enabled (and disabled again to verify).

This is still the case today on the 1,0 branch, as of revision 6513.

-- DrakeDiedrich - 25 Feb 2010

This is a major oversight on my part. I forgot the requires param on an addToHead. On my test environments Foswiki seemed to add the inserted chunks in the order that was called. Also I am now painfully aware that the tinymce javascript tries to parse out meta tags as soon as the script is loaded.

Set to waiting for Drake in case he has time to confirm the fix works, I made a new release.

-- PaulHarvey - 26 Feb 2010

Works for me, 6527 from release branch. Thanks!

-- DrakeDiedrich - 26 Feb 2010

as discussed with Paul on irc today - this issue is still present in trunk - but he's working on it (or has commited in the last hours?)

-- SvenDowideit - 03 Mar 2010

Sadly it seems JQueryPlugin has no capability to work without ZonePlugin. Working through this at Tasks.Item8655. My commit was a cheap cop-out in the form of a configure checker for JQueryPlugin to warn when you have no ZonePlugin.

-- PaulHarvey - 03 Mar 2010

ZonePlugin is merged with core now, and both Release01x00 and trunk branches behave properly. This problem is resolved.

-- PaulHarvey - 28 Mar 2010

Use PUBURLPATH instead of URLPATH

-- PaulHarvey - 29 Mar 2010
 
Topic revision: r23 - 08 Sep 2010, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy