Item2222: Conversion to HTML failed. TML:

pencil
Priority: Urgent
Current State: Closed
Released In: 1.0.8, 1.1.0
Target Release: patch
Applies To: Extension
Component: WysiwygPlugin
Branches:
Reported By: SinnerBOFH
Waiting For:
Last Change By: KennethLavrsen
After a fresh install of 1.0.7"

Created 2 users, try to edit WikGroup with WYSIWYG editor to add new suers as Administrators. On save, formating gets messed up. With raw edit, edit goes OK

Editing SandBox or creating new pages works fine as well.

. On data/warn2009....txt I notice the error:

(QUOTE START)
| 2009-10-07T13:44:53Z warning | Conversion to HTML failed. TML:<br />---+&nbsp;Administrator&nbsp;Group<br &#47;><br &#47;><br &#47;>&nbsp;&nbsp;&nbsp;*&nbsp;Member&nbsp;list&nbsp;(comma-separated&nbsp;list):<br &#47;>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Set&nbsp;GROUP&nbsp;=&nbsp;AdministratorUser<br &#47;>&nbsp;&nbsp;&nbsp;*&nbsp;Persons&#47;group&nbsp;who&nbsp;can&nbsp;change&nbsp;the&nbsp;list:<br &#47;>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Set&nbsp;ALLOWTOPICCHANGE&nbsp;=&nbsp;AdminGroup<br &#47;><br &#47;>%INCLUDE{&#34;%USERSWEB%.AdminUser&#34;&nbsp;section=&#34;sudo_login&#34;}%<br &#47;><br &#47;>%IF{&#34;(NOT&nbsp;defined&nbsp;GROUP)&nbsp;OR&nbsp;$GROUP&nbsp;=&nbsp;&#39;&#39;&#34;&nbsp;then=&#34;&#34;&nbsp;else=&#34;&#60;!--&#34;}%<br &#47;>&#60;sticky&#62;&#60;div&nbsp;style=&#34;background-color:yellow&#34;&#62;&#60;&#47;sticky&#62;<br&#47;>*How&nbsp;to&nbsp;add&nbsp;the&nbsp;first&nbsp;administrator*&nbsp;%BR%<br&#47;>If&nbsp;you&nbsp;haven&#39;t&nbsp;previously&nbsp;set&nbsp;up&nbsp;an&nbsp;administrator,&nbsp;follow&nbsp;these&nbsp;steps:<br &#47;>&nbsp;&nbsp;&nbsp;1&nbsp;Authenticate&nbsp;as&nbsp;the&nbsp;internal&nbsp;administrator:<br&#47;>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;%ADMINLOGIN%<br &#47;>&nbsp;&nbsp;&nbsp;1&nbsp;Edit&nbsp;this&nbsp;topic<br&#47;>&nbsp;&nbsp;&nbsp;1&nbsp;Insert&nbsp;the&nbsp;wikinames&nbsp;of&nbsp;admin&nbsp;users&nbsp;in&nbsp;the&nbsp;Administrator&nbsp;Group&nbsp;by&nbsp;listing&nbsp;them&nbsp;in&nbsp;the&nbsp;GROUP&nbsp;setting&nbsp;%BR%&nbsp;(example&nbsp;=*&nbsp;Set&nbsp;GROUP&nbsp;=&nbsp;&#60;nop&#62;JohnSmith,&nbsp;&#60;nop&#62;JamesBond=)<br &#47;>&nbsp;&nbsp;&nbsp;1&nbsp;Save&nbsp;this&nbsp;topic<br &#47;>&nbsp;&nbsp;&nbsp;1&nbsp;[[%LOGOUTURL%][Logout]]&nbsp;from&nbsp;the&nbsp;Internal&nbsp;AdminUser<br &#47;>&nbsp;&nbsp;&nbsp;1&nbsp;Verify&nbsp;that&nbsp;new&nbsp;members&nbsp;show&nbsp;up&nbsp;properly&nbsp;in&nbsp;the&nbsp;group&nbsp;listing&nbsp;at&nbsp;[[%USERSWEB%.Groups]]<br&#47;>&nbsp;&nbsp;&nbsp;1&nbsp;Make&nbsp;sure&nbsp;always&nbsp;to&nbsp;keep&nbsp;this&nbsp;topic&nbsp;write&nbsp;protected&nbsp;by&nbsp;keeping&nbsp;the&nbsp;already&nbsp;defined&nbsp;ALLOWTOPICCHANGE&nbsp;setting<br &#47;>&nbsp;&nbsp;&nbsp;1&nbsp;The&nbsp;ALLOWTOPICHANGE&nbsp;and&nbsp;ALLOWTOPICRENAME&nbsp;settings&nbsp;in&nbsp;[[%SYSTEMWEB%.DefaultPreferences]]&nbsp;and&nbsp;[[%LOCALSITEPREFS%]]&nbsp;have&nbsp;already&nbsp;been&nbsp;set&nbsp;to&nbsp;this&nbsp;group&nbsp;(&#60;nop&#62;AdminGroup),&nbsp;restricting&nbsp;edit&nbsp;of&nbsp;site-wide&nbsp;preferences&nbsp;to&nbsp;the&nbsp;Wiki&nbsp;Administrator&nbsp;Group<br &#47;>&#60;sticky&#62;&#60;&#47;div&#62;&#60;&#47;sticky&#62;<br &#47;>%IF{&#34;(NOT&nbsp;defined&nbsp;GROUP)&nbsp;OR&nbsp;$GROUP&nbsp;=&nbsp;&#39;&#39;&#34;&nbsp;then=&#34;&#34;&nbsp;else=&#34;--&#62;&#34;}%<br &#47;><br &#47;>---<br &#47;>*Related&nbsp;topics:*&nbsp;[[%WIKIUSERSTOPIC%]],&nbsp;[[AdminUser]],&nbsp;[[WikiGroups]],&nbsp;[[%SYSTEMWEB%.AccessControl][AccessControl]] at /usr/wwws/users/eradsys/wiki/lib/Foswiki/Plugins/WysiwygPlugin/TML2HTML.pm line 1
15.
 |
(QUOTE END)

Discussing on IRC we got this brainstorm:

[14:25] <SinnerP> hi there. When I try to edit WikGroup with WYSIWYG editor, formating gets messed up. With raw edit, all is OK. On data/warn2009....txt I notice the errors: "Conversion to HTML failed. TML:" and "[[YSTEMWEB%.AccessControl][AccessControl]] at /usr/wwws/users/eradsys/wiki/lib/Foswiki/Plugins/WysiwygPlugin/TML2HTML.pm line 115."
[14:25] <SinnerP> any idea?
[14:25] <-- EugenMayer has left this server ("Leaving.").
[14:25] <SinnerP> sorry for the formatting; pasting from warn file caused the strikethrough
[14:27] <-- AndreU has left this server (Read error: 60 (Operation timed out)).
[14:29] <MTempest> SinnerP: That is a bug in WysiwygPlugin, which is triggered by specific content in that topic. (but I don't know which particular content, yet)
[14:30] <SinnerP> MTempest: adding new pages to both Main and SandBox works fine (no errors with WYSIWYG editor)
[14:31] <MTempest> SinnerP: Does the topic that causes the problem have private information in it, or can you pastebin it?
[14:33] <SinnerP> MTempest: the problem arises on a new installation, after creating a couple of users and trying to add them to the Administrator Group using the "wiki admin" user
[14:34] <SinnerP> it's the page http://$YOUR_WEBSITE/foswiki/bin/view/Main/AdminGroup
[14:34] * MTempest looks at that page
[14:43] <MTempest> It works better when I use a supported browser :/
[14:44] <MTempest> If I edit that page, the editor window contains:
[14:44] <MTempest> Foswiki detected an internal error - please check your Foswiki logs and webserver logs for more information. Conversion to HTML failed. TML:
[14:44] <MTempest> ---+ Administrator Group
[14:44] <MTempest> etc etc
[14:45] <SinnerP> exactly
[14:45] <SinnerP> MTempest: I use FireFox 3.5.3
[14:46] <MTempest> Have you created a task for this problem?
[14:46] <SinnerP> MTempest: I beg your pardon?
[14:48] <SinnerP> I don't understand your question
[14:48] <MTempest> SinnerP: I meant - have you reported this bug on foswiki.org, e.g. via http://foswiki.org/Tasks/CreateNewTask ?
[14:48] <SinnerP> ah, no
[14:48] <SinnerP> I thought it was a problem on my side
[14:49] <MTempest> Please do. The problem is with TinyMCEPlugin and/or WysiwygPlugin.
[14:50] <MTempest> Foswiki tries to convert that topic to HTML, but the conversion fails. That is the first part of the problem.
[14:51] <MTempest> The second part is that Foswiki should handle this condition gracefully, but it doesn't.
[14:51] <-- CDot has left this server ("Leaving.").
[14:52] <SinnerP> ok
[14:53] * MTempest wonders how to fix the second problem whilst not hiding the first problem
[14:56] <ArthurClemens> strange, I can edit AdminGroup fine
[14:56] <ArthurClemens> but there is an encoding problem in the topic, just after <sticky>
[14:58] <MTempest> ArthurClemens: How can you tell that there is an encoding problem? What should I be looking for?
[14:58] <ArthurClemens> hmm, perhaps after a previous edit
[14:58] <ArthurClemens> I reverted with svn and now it is gone
[14:58] <ArthurClemens> it is a diamond char with a question mark in it
[14:59] <MTempest> Ah
[14:59] <ArthurClemens> or rather, that is what I saw
[14:59] <ArthurClemens> a left over from a div
[14:59] <-- MichaelDaum has left this server (Remote closed the connection).
[14:59] <SinnerP> MTempest: what should I choose as Affected component ?
[14:59] <ArthurClemens> ok, it is there again
[15:00] <MTempest> SinnerP: WysiwygPlugin
[15:02] <ArthurClemens> http://foswiki.org/Sandbox/EditProblems
[15:02] <ArthurClemens> I have added a screenshot
[15:03] <ArthurClemens> the TML is this line: <sticky><div style="background-color:yellow"></sticky>
[15:03] <MTempest> ArthurClemens: That makes sense. What version of WysiwygPlugin do you have?
[15:04] <ArthurClemens> I am testing this in release branch
[15:04] <ArthurClemens> as SinnerP mentioned a problem with his fresh install
[15:04] <MTempest> ok
[15:06] <ArthurClemens> it is the line before that messes up
[15:06] <ArthurClemens> %IF{"(NOT defined GROUP) OR $GROUP = ''" then="" else="<!--"}%
[15:08] <ArthurClemens> you can test it on http://foswiki.org/Sandbox/EditProblems
[15:09] <ArthurClemens> if you edit the topic the text gets garbled
[15:09] <ArthurClemens> if you raw edit and remove the IF line, and save, then rich edit again, it works fine
[15:10] <MTempest> I don't see the diamond. I get "Foswiki detected an error..." followed by the topic TML

-- SinnerBOFH - 07 Oct 2009

If you would like to patch your own Foswiki before a normal update is available, the least you should do is to copy the change to TML2HTML.pm in distro:58b895ab142d

-- MichaelTempest - 08 Oct 2009

ItemTemplate edit

Summary Conversion to HTML failed. TML:
ReportedBy SinnerBOFH
Codebase 1.0.7, trunk
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Extension
Component WysiwygPlugin
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:58b895ab142d distro:9b7e2f1d8a74
TargetRelease patch
ReleasedIn 1.0.8, 1.1.0
Topic revision: r7 - 29 Nov 2009, 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