You are here: Foswiki>Tasks Web>Item11658 (01 Dec 2014, GeorgeClark)Edit Attach

Item11658: EDITTABLE does not work in multi-line syntax.

pencil
Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: EditTablePlugin
Branches:
Reported By: SvenDowideit
Waiting For:
Last Change By: GeorgeClark
it looks like it used to work in tmwiki: this is working topic text from the upgrade I'm doing - it breaks on foswiki.

%EDITTABLE{ format="| select, 1, Comms, Business, DG, Labs, LearnDev, 
Services, Tech, Staff | select, 1, Helpdesk, Publications, Software, etc 
| text, 20, init |" }%

I hope to fix this for 1.1.5, but it has probably been broken a long time (as this is a cairo-development pre-release)

-- SvenDowideit - 18 Mar 2012

Crawford, Arthur and well, anyone else that has thought about the EDITTABLE mess.

Note: this only applies to EDITTABLE that has a tml table following it - EDITTABLE macros with no attached table (so you can create one) can be dealt with by a proper macro handler!

what if we don't regex for

our $PATTERN_EDITTABLEPLUGIN = qr'(%EDITTABLE{([^\n]*)}%)'

but instead multi-line regex for

our $PATTERN_EDITTABLEPLUGIN = qr'(%EDITTABLE{(.*)}%\n\|)'

as far as I can contemplate, there are very few things that are processed by edit(table|row), and they are

%EDITTABLE%
| table |

%EDITTABLE%
%TABLE%
| table |


%EDITTABLE{.anything that can contain %{}%..}%
| table |

%EDITTABLE{.anything that can contain %{}%..}%
%TABLE{.anything that can contain %{}%..}%
| table |

so by changing that, we could cover

%EDITTABLE%
| table |

%EDITTABLE%
%TABLE%
| table |


%EDITTABLE{
.anything that 
can contain %{}%..
}%
| table |

%EDITTABLE{.anything 
that can contain %{
}%..}%
%TABLE{.anyth
ing that can conta
in %{}%..}%
| table |

I'm proposing just to take )\n\| and remove the line-feeds and then send it on its normal way. - is there a glaring issue with this?

individual tests all pass, but running them as a suite fails. and tbh, I've got more pressing things to fix, so I'll leave this here for 1.2+

-- SvenDowideit - 22 Mar 2012

In release branch a number of tests fails even when run individually.

For example:
Can't call method "param" on an undefined value at foswiki.release01x01/core/lib/Foswiki/Plugins/EditTablePlugin/Core.pm line 286.

Which is
Foswiki::Plugins::EditTablePlugin::EditTableData::createTableChangesMap(
            $query->param('ettablechanges') )

so apparently the query object does not exist. Confusing.

-- ArthurClemens - 24 Mar 2012

Is this sufficiently important, or do we phase out this plugin?

-- ArthurClemens - 16 Jun 2012

y, we are phasing out this plugin for 1.2.0 - but its replacement should also do this - and from memory EditRowPlugin also failed

-- SvenDowideit - 17 Jun 2012

EditRowPlugin uses the parser from the core (or the copy in TablesContrib) so handles multi-line macros.

-- CrawfordCurrie - 10 Sep 2012

EditTablePlugin is no longer in the core for 1.2, so this drops to a plugin-specific issue and Normal status.

-- CrawfordCurrie - 14 Mar 2014

ItemTemplate edit

Summary EDITTABLE does not work in multi-line syntax.
ReportedBy SvenDowideit
Codebase 1.1.4
SVN Range
AppliesTo Extension
Component EditTablePlugin
Priority Normal
CurrentState Confirmed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
I Attachment Action Size Date Who Comment
Item11658.diffdiff Item11658.diff manage 7 K 22 Mar 2012 - 11:04 SvenDowideit diff to 1.1.5pre
Topic revision: r11 - 01 Dec 2014, GeorgeClark
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