• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7700 for generic doc work for TWiki-6.0.2. Use View topic Item7703 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4844: Saving a table from IE doesn't convert it back to TML

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension TinyMCEPlugin Urgent Closed   minor  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Another TMCE eats newlines problem.

In my view a duplicate but Crawford insists that I open new so here is one more.

It is very very very common to have a TABLE and and EDITTABLE before a table. The EditTablePlugin and TablePlugin like to many other plugins are not tolerant to having the tags on the same line.

Here is a test case

%TABLE{columnwidths="80,80,50,110,150,50,50,50,50,50,70,70,50" dataalign="left,left,center,left,left,center,center,center,center,center,center,right,right,center" headeralign="center" headerrows="1" footerrows="1" headerislabel="on"}%
%EDITTABLE{format="|text,10|text,10|text,3|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0|text,5|" }%
| *Project* | *Customer* | *Pass* | *Type* | *Purpose* | *Qty* | *Radios* | *Controllers* | *Hubs* | *Tuners* | *Hybrid* | *Unit Cost (USD)* | *Total Cost (USD)* | *When (Q)* |
| Project X | Engineering | A | PK2 | Eng Test | 2 | 4 |  | 2 | 2 |  | 6214 | %CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}% | Q1 |
| Project X | Factory | A | PC2 | Fact Test | 1 | 4 |  | 2 | 2 |  | 6214 | %CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}% | Q1 |
| Project Y | Eng | P1 | CT5 | Eng Test | 1 | 2 | 1 |  |  | 1 | 3502 | %CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}% | Q1 |
| Project Y | SW | P1 | CT5 | SW Dev | 2 | 4 | 2 |  | 2 |  | 6345 | %CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}% | Q1 |
| Total |  |  |  |  | *%CALC{"$SUM($ABOVE())"}%* | *%CALC{"$SUMPRODUCT(R2:C6..R$ROW(-1):C6, R2:C$COLUMN(0)..R$ROW(-1):C$COLUMN(0))"}%* | *%CALC{"$SUMPRODUCT(R2:C6..R$ROW(-1):C6, R2:C$COLUMN(0)..R$ROW(-1):C$COLUMN(0))"}%* | *%CALC{"$SUMPRODUCT(R2:C6..R$ROW(-1):C6, !R2:C$COLUMN(0)..R$ROW(-1):C$COLUMN(0))"}%* | *%CALC{"$SUMPRODUCT(R2:C6..R$ROW(-1):C6, R2:C$COLUMN(0)..R$ROW(-1):C$COLUMN(0))"}%* | *%CALC{"$SUMPRODUCT(R2:C6..R$ROW(-1):C6, R2:C$COLUMN(0)..R$ROW(-1):C$COLUMN(0))"}%* |  | *%CALC{"$SUM($ABOVE())"}%* |  |

or in real live mode

Project Customer Pass Type Purpose Qty Radios Controllers Hubs Tuners Hybrid Unit Cost (USD) Total Cost (USD) When (Q)
Total         6 22 5 6 10 1   34834  
Project X Engineering A PK2 Eng Test 2 4   2 2   6214 12428 Q1
Project X Factory A PC2 Fact Test 1 4   2 2   6214 6214 Q1
Project Y Eng P1 CT5 Eng Test 1 2 1     1 3502 3502 Q1
Project Y SW P1 CT5 SW Dev 2 4 2   2   6345 12690 Q1

  • Hit the edit button of the table
  • The row is now below the footer row (another bug report is open for this)
  • Move the row up in the middle
  • Save
  • All is well
  • Now edit and save the topic in IE using TMCE.
  • Note in raw view that TABLE and EDITTABLE are now on the same line. The newline is eaten. THAT IS THE NEWLINE EATING BUG
  • Go to normal view
  • Hit the edit button.
  • Add a row
  • The row is now below the footer row
  • Move the row up in the middle of the table
  • Save
  • Note how the table is destroyed. The edit button is above the table and the table seems split and totally toasted.
  • Another example of why TMCE must never remove a new line before a twiki variable like it does now.

-- TWiki:Main/KennethLavrsen - 18 Oct 2007

i don't fully understand what you are trying to describe, and certainly I have no problems editing this table when I use the EditRowPlugin and TinyMCE.

I suspect the edit tabl plugin bug that started this has since been fixed, as I see nothing wrong with the table. However I tried to reproduce the steps you describe. How are you supposed to move a row using the EditTablePlugin? I tried every combination of drag and drop, clicking and general farting around to try and reproduce this, and nothing worked.

Is the basis of this report that the EditTablePlugin is unable to have other tags on the same line as the EDITTABLE tag? If so, surely this is a bug with that plugin? Certainly the EditRowPlugin has no problem with it.

CC

The bug is that TMCE removes the new line in front of a TWikiVariable.

It is the same bug already reported 4 or 5 times now with different symptoms each time.

And it is always something elses fault. It is TMCE. It is IE. It is the plugin. NO. The problem is simple. If there was a newline in front of a TWikiVariable before you hit edit it must also be there when you save it. Unless the user has deleted the new line.

How this gets fixed and who's fault it is does not matter. Our users will have nothing but trouble with the Wysiwyg editor unless this type of error is fixed.

I saw Harald reporting a similar bug item today. Same thing as this. Exactly the same thing. Two lines - each with a TWikiVariable - and after an edit/save cycle with TMCE they are both on the same line. And that will again and again and again show up as new errors because TML is so sensitive to what is at the start of a line.

Examples can be many more. SEARCH with a format that returns bullets. SEARCH that returns a table. Plugins that expect the variable to be the only thing on a line. IF variables used like in ApacheConfigGenerator etc etc etc.

This has to be solved. Otherwise TMCE should not be the default editor in 4.2.

About moving rows. I cannot confirm if Arthur has fixed the other problem. I just landed in Montreal and only has a laptop with Linux so I cannot test in IE now. I can tomorrow.

You tested with EditTablerowPlugin. That I do not use. I reported the bug with standard EditTablePlugin.

You move a row by clicking on the move button (while in edit mode) and clicking on the line between the two rows where you want the row moved to.

-- TWiki:Main.KennethLavrsen - 19 Oct 2007

After having had access to to a Windows machine with IE7 I tried to paste in the edit table example in Raw Edit and do a simple Edit save cycle in IE7.

The result is total destruction this time.

---++ Complex Edit Table

%TABLE{columnwidths="80,80,50,110,150,50,50,50,50,50,70,70,50" dataalign="left,left,center,left,left,center,center,center,center,center,center,right,right,center" headeralign="center" headerrows="1" footerrows="1" headerislabel="on"}% %EDITTABLE{format="|text,10|text,10|text,3|text,15|text,15|text,3|text,3|text,3|text,3|text,3|text,3|text,10|label,0|text,5|" }%
<TABLE cellSpacing="1" cellPadding="0" border="1"> <TBODY> <TR> <TH>Project</TH> <TH>Customer</TH> <TH>Pass</TH> <TH>Type</TH> <TH>Purpose</TH> <TH>Qty</TH> <TH>Radios</TH> <TH>Controllers</TH> <TH>Hubs</TH> <TH>Tuners</TH> <TH>Hybrid</TH> <TH>Unit Cost (USD)</TH> <TH>Total Cost (USD)</TH> <TH>When (Q)</TH></TR> <TR> <TD>Project X</TD> <TD>Engineering</TD> <TD>A</TD> <TD>PK2</TD> <TD>Eng Test</TD> <TD>2</TD> <TD>4</TD> <TD> </TD> <TD>2</TD> <TD>2</TD> <TD> </TD> <TD>6214</TD> <TD>%CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}%</TD> <TD>Q1</TD></TR> <TR> <TD>Project X</TD> <TD>Factory</TD> <TD>A</TD> <TD>PC2</TD> <TD>Fact Test</TD> <TD>1</TD> <TD>4</TD> <TD> </TD> <TD>2</TD> <TD>2</TD> <TD> </TD> <TD>6214</TD> <TD>%CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}%</TD> <TD>Q1</TD></TR> <TR> <TD> </TD> <TD> </TD> <TD> </TD> <TD> </TD> <TD> </TD> <TD> </TD> <TD> </TD> <TD> </TD> <TD> </TD> <TD> </TD> <TD> </TD> <TD> </TD> <TD> </TD> <TD> </TD></TR> <TR> <TD>Project Y</TD> <TD>Eng</TD> <TD>P1</TD> <TD>CT5</TD> <TD>Eng Test</TD> <TD>1</TD> <TD>2</TD> <TD>1</TD> <TD> </TD> <TD> </TD> <TD>1</TD> <TD>3502</TD> <TD>%CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}%</TD> <TD>Q1</TD></TR> <TR> <TD>Project Y</TD> <TD>SW</TD> <TD>P1</TD> <TD>CT5</TD> <TD>SW Dev</TD> <TD>2</TD> <TD>4</TD> <TD>2</TD> <TD> </TD> <TD>2</TD> <TD> </TD> <TD>6345</TD> <TD>%CALC{"$EVAL($T(R$ROW():C6) * $T(R$ROW():C$COLUMN(-1)))"}%</TD> <TD>Q1</TD></TR> <TR> <TD>Total</TD> <TD> </TD> <TD> </TD> <TD> </TD> <TD> </TD> <TH>%CALC{"$SUM($ABOVE())"}%</TH> <TH>%CALC{"$SUMPRODUCT(R2:C6..R$ROW(-1):C6, R2:C$COLUMN(0)..R$ROW(-1):C$COLUMN(0))"}%</TH> <TH>%CALC{"$SUMPRODUCT(R2:C6..R$ROW(-1):C6, R2:C$COLUMN(0)..R$ROW(-1):C$COLUMN(0))"}%</TH> <TH>%CALC{"$SUMPRODUCT(R2:C6..R$ROW(-1):C6, R2:C$COLUMN(0)..R$ROW(-1):C$COLUMN(0))"}%</TH> <TH>%CALC{"$SUMPRODUCT(R2:C6..R$ROW(-1):C6, R2:C$COLUMN(0)..R$ROW(-1):C$COLUMN(0))"}%</TH> <TH>%CALC{"$SUMPRODUCT(R2:C6..R$ROW(-1):C6, R2:C$COLUMN(0)..R$ROW(-1):C$COLUMN(0))"}%</TH> <TD> </TD> <TH>%CALC{"$SUM($ABOVE())"}%</TH> <TD> </TD></TR></TBODY></TABLE>

(this was added in Raw Edit)

-- KennethLavrsen - 18 Oct 2007

No, I was pointing out that EditRowPlugin ( not EditTablerowPlugin, which is something else) has no problem with this table before or after editing, despite TWiki variables being pulled onto a single line.

I'm not trying to pass the buck on this; I know it has to be solved. It's just that I have absolutely no idea how to solve it.

-- TWiki:Main.CrawfordCurrie - 19 Oct 2007

Corrected headline (was "TMCE new line eating destroys edit tables") to reflect reported bug. This is actually another example of why a new bug item is required for each report; this latest issues was IE specific, and totally unrelated to the interpretation of TWiki variables.

CC

ItemTemplate
Summary Saving a table from IE doesn't convert it back to TML
ReportedBy TWiki:Main.KennethLavrsen
Codebase 4.2.0, ~twiki4
SVN Range TWiki-4.3.0, Fri, 12 Oct 2007, build 15261
AppliesTo Extension
Component TinyMCEPlugin
Priority Urgent
CurrentState Closed
WaitingFor

Checkins TWikirev:15369 TWikirev:15370
TargetRelease minor
ReleasedIn

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2007-10-21 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback