New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists

Item14516: table not processed when there is a %FOOBAR{} before

Priority: Urgent
Current State: Confirmed
Released In: 2.1.6
Target Release: patch
Applies To: Extension
Component: EditRowPlugin
Reported By: MichaelDaum
Waiting For:
Last Change By: LynnwoodBrown
Test: %FOOBAR{}

%EDITTABLE{format="| text,20| text,20| text,20| text,20|"}%
head head head head
data data data data
data data data data
data data data data
data data data data

%EDITTABLE is not processed. Removing %FOOBAR{} makes it work again

EditTablePlugin works just fine.

-- MichaelDaum - 13 Oct 2017

Digging into the code the error seems to be located in Foswiki::Tables::Parser: any unclosed macro will stop the analysis at line 149. CDot, any idea?

-- MichaelDaum - 27 Nov 2017

The only way to make this behave exactly like the core macro processing would be to duplicate the behaviour of the core macro parser exactly, while interleaving parsing of the vertical-bar syntax for tables. That could be done, but it's quite a lot of work. The core parser is stream-based, while the vertical bar syntax is line based, which makes it quite tricky.

-- Main.CrawfordCurrie - 31 Jan 2018 - 10:13

I have some other situations that I believe are related to this bug. If one has multiple tables with EDITTABLE macro and insert %FOOBAR{} after the first table, all the rest of the topic disappears completely. I set up a demonstration of this at Sandbox.TestEditRowPlugin, or you can simply move %FOOBAR{} above after the initial table.

Another case I've run into that I suspect is related is if you have multiple tables in a topic and are using NatSkin and then look at the print view. The first table will display properly and then the rest of tables with have %EDITTABLE{}% macro preceeding them.

-- LynnwoodBrown - 28 Feb 2018

Just as an experiment, I commented out lines 149-155 of Foswiki::Tables::Parser. When I did this, a stray unresolved marco neither disabled the subsequent EDITTABLE macros nor made the subsequent text disappear. However, the un-resolved EDITTABLE macros remained when viewing in NatSkin print view, so I'm not sure now that this is related. Very odd behavior, for sure...

-- LynnwoodBrown - 28 Feb 2018

ItemTemplate edit

Summary table not processed when there is a %FOOBAR{} before
ReportedBy MichaelDaum
Codebase 2.1.4
SVN Range
AppliesTo Extension
Component EditRowPlugin
Priority Urgent
CurrentState Confirmed
TargetRelease patch
ReleasedIn 2.1.6
Topic revision: r6 - 28 Feb 2018, LynnwoodBrown - This page was cached on 13 Mar 2018 - 01:17.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License