Item1221: EditTablePlugin cannot read a TABLE tag with macros

pencil
Priority: Urgent
Current State: Closed
Released In: 1.0.4
Target Release: patch
Applies To: Extension
Component: EditTablePlugin
Branches:
Reported By: KennethLavrsen
Waiting For:
Last Change By: KennethLavrsen
Below test case shows this.

When you edit the table and add a row the row is supposed to be inserted above the footer row. ETP is supposed to read the TABLE tag and see the footerrows="1"

The root cause is the ENCODE that I added to trigger the problem.

The ENCODE of 80 returns simply 80. It is the regex in ETP that reads the TABLE tag that stops at the }% of ENCODE. It is exactly the same problem we just fixed for the EDITTABLE tag. And needs same type of fix.

Even though it is silly to add a ENCODE it is common to use macros inside the TABLE tag and if this macro is of a type that takes parameters the ETP fails. This should be fixed.

Defining Table

Item Cost (USD) Comments
Mechanics
600
All mechanical parts
Board A
400
Main board
Board B
350
Controller board
PSU
300
Power Supply
Filter
700
Noise filter
Package
200
Enclosure

Cost of Items

Customer Pass Purpose Qty Mech Parts Main bd Control bd PSU Filter Package Cost (USD) When (Q)
Total
 
 
10
10
10
10
10
10
0
23500
 
Eng A
P1
Proto test
3
1
1
1
1
1
0
7050
Q309
Eng B
P1
Proto test
2
1
1
1
1
1
0
4700
Q309
SW Eng
P1
Proto test
3
1
1
1
1
1
0
7050
Q309
Controlbd
P1
Manuf test
2
1
1
1
1
1
0
4700
Q309

-- KennethLavrsen - 08 Mar 2009

I see. The col width parameter gets translated to:
.foswikiTable#table2 td.foswikiTableCol0 {width:80%22%20%22START_EDITTABLEPLUGIN_TMP_TAG;}

-- ArthurClemens - 08 Mar 2009

Fixed in trunk.

-- ArthurClemens - 10 Mar 2009

Still a problem: the macro is saved expanded, so the original syntax is lost.

-- ArthurClemens - 10 Mar 2009

I not see this issue Arthur. In fact I have not been able to break the ETP all day

Remember that all macros in the ETP tag itself are supposed to expanded. If you want to specify a format where a Macro is saved as a macro when adding new rows you are supposed to use the $percnt and $quot syntax.

-- KennethLavrsen - 10 Mar 2009

Everything within EDITTABLE{...} gets expanded and saved back to the page. So any ENCODE macro is lost.

-- ArthurClemens - 10 Mar 2009

Ah. In the EDITTABLE tag. I see that now. That is a bad one that needs to be fixed.

Note that fixes must now happen in both trunk and Release01x00

-- KennethLavrsen - 10 Mar 2009

-- KennethLavrsen - 10 Mar 2009

ItemTemplate edit

Summary EditTablePlugin cannot read a TABLE tag with macros
ReportedBy KennethLavrsen
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component EditTablePlugin
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:0d2623aaec90 distro:1d7ecc159e3f distro:93764b160702 distro:a5e15045b961 distro:4b3b2e5b60c5
TargetRelease patch
ReleasedIn 1.0.4
Topic revision: r15 - 19 Mar 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