Item1491: EditTablePlugin conflicts with HolidaylistPlugin

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: EditTablePlugin, HolidaylistPlugin
Branches:
Reported By: Foswiki:Main.IngoKappler
Waiting For:
Last Change By: CrawfordCurrie
When using the EditTablePlugin and the HolidaylistPlugin at the same topic, the EditTablePlugin tables will not be displayed anymore.

Please find here some example code to be put on a test topic:

%HOLIDAYLIST{ startdate="-15" days="120" showoptions="on" showweekends="0" enablepubholidays="1" showpubholidays="0" pubholidayicon=":-)" adayofficon=":ok:" holidayicon="8-)" notatworkicon=":mad:" tablecaption="%SPACEOUT{%BASETOPIC%}% Vacations" todaybgcolor="lightyellow" namepos="both" showstatrow="off" showstatcol="on" showstatsum="on" statheader=" :-) | :ok: 8-) " statformat="%{pp} | %{hh}" }%

   * 01 Jan 2009 - Ingo

   * 01 Jan 2009 - *Neujahr* <!--@all-->
   * 19 Feb 2009 - *Weiberfastnacht* <!--@all-->
   * 23 Feb 2009 - *Rosenmontag* <!--@all-->
   * 10 Apr 2009 - *Karfreitag* <!--@all-->
   * 13 Apr 2009 - *Ostermontag* <!--@all-->
   * 01 May 2009 - *Tag der Arbeit* <!--@all-->
   * 21 May 2009 - *Himmelfahrt* <!--@all-->
   * 01 Jun 2009 - *Pfingstmontag* <!--@all-->
   * 11 Jun 2009 - *Frohnleichnam* <!--@all-->
   * 03 Oct 2009 - *Tag der deutschen Einheit* <!--@all-->
   * 01 Nov 2009 - *Allerheiligen* <!--@all-->
   * 24 Dec 2009 - *Heiligabend* <!--@all-->
   * 25 Dec 2009 - *1. Weihnachtstag* <!--@all-->
   * 26 Dec 2009 - *2. Weihnachtstag* <!--@all-->
   * 31 Dec 2009 - *Sylvester* <!--@all-->

%EDITTABLE{ format="| text, 20 | text, 20 | text, 2 | textarea |" changerows="on" buttonrow="bottom" }%
| *Hardware* | *Details* | *Count* | *Comment* |
| Monitor | Samsung !SyncMaster 203B | 1 | |

-- IngoKappler

It works for me.

http://merlin.lavrsen.dk/foswiki10/bin/view/Myweb/HolidayPluginTest

But my code is currently 1.0.5.

When I release try to upgrade. It could be the EditTablePlugin fixes that fix the problem.

-- KennethLavrsen - 25 Apr 2009

After the upgrade to 1.0.5 on my system the issue is still reproducible in the homepage topic. When I moved the example code from above into a Sandbox topic the issue didn't occur.

I've now isolated the problem to be related to an include line. The following code makes the issue reproducible. The HOLIDAYLIST table definition is kept behind this INCLUDE and is:

%STARTSECTION{"VacationPersonal"}%
%HOLIDAYLIST{ startdate="-15" days="120" showoptions="on" showweekends="0" enablepubholidays="1" showpubholidays="0" pubholidayicon=":-)" adayofficon=":ok:" holidayicon="8-)" notatworkicon=":-I" tablecaption="%SPACEOUT{%BASETOPIC%}% Vacations" namepos="both" todaybgcolor="lightyellow" tableheadercolor="#8fadff" weekendbgcolor="#8fadff" showstatrow="off" showstatcol="on" showstatsum="on" statheader=" :-) | :ok: 8-) " statformat="%{pp} | %{hh}" }%
%ENDSECTION{"VacationPersonal"}%

As soon as this code is put directly into the topic the EDITTABLE will show up but as long as the code is included the EDITTABLE will not be visible.

%INCLUDE{ "%USERSWEB%.WikiCodeVacation" section="VacationPersonal" }%

   * 01 Jan 2009 - Ingo

   * 01 Jan 2009 - *Neujahr* <!--@all-->
   * 19 Feb 2009 - *Weiberfastnacht* <!--@all-->
   * 23 Feb 2009 - *Rosenmontag* <!--@all-->
   * 10 Apr 2009 - *Karfreitag* <!--@all-->
   * 13 Apr 2009 - *Ostermontag* <!--@all-->
   * 01 May 2009 - *Tag der Arbeit* <!--@all-->
   * 21 May 2009 - *Himmelfahrt* <!--@all-->
   * 01 Jun 2009 - *Pfingstmontag* <!--@all-->
   * 11 Jun 2009 - *Frohnleichnam* <!--@all-->
   * 03 Oct 2009 - *Tag der deutschen Einheit* <!--@all-->
   * 01 Nov 2009 - *Allerheiligen* <!--@all-->
   * 24 Dec 2009 - *Heiligabend* <!--@all-->
   * 25 Dec 2009 - *1. Weihnachtstag* <!--@all-->
   * 26 Dec 2009 - *2. Weihnachtstag* <!--@all-->
   * 31 Dec 2009 - *Sylvester* <!--@all-->

Here must the table be visible:

%EDITTABLE{ format="| text, 20 | text, 20 | text, 2 | textarea |" changerows="on" buttonrow="bottom" }%
| *Hardware* | *Details* | *Count* | *Comment* |
| Monitor | Samsung !SyncMaster 203B | 1 | |

-- IngoKappler - 21 May 2009

I can confirm this bug.

I copied the setup above. Clicking the "Edit" button makes the table disappear.

In my server log I get the error: viewauth: Deep recursion on subroutine "Foswiki::Meta::expandMacros.

Even if I put in a 'recursionBlock', as Kenneth has done for EditTable, the recursion is gone, but the topic is parsed twice. Looking at the debug it appears that HolidayListPlugin makes the topic go twice the loop of beforeCommonTagsHandler.

Found it: the inited state in ETP prevents this type of recursion. I have uncommented it again.

-- ArthurClemens - 14 Jun 2009

But that change screws the unit tests considerably. Removing this 'fix'.

-- ArthurClemens - 15 Jun 2009

It works if line 1547 is commented out:
#$text = Foswiki::Func::expandCommonVariables($text,$web,$topic);

Is there a reason variables need to get expanded here?

Also note that $web and $topic are in the wrong order. The function takes:
expandCommonVariables( $text, $topic, $web, $meta )

This is wrong in line 1601 as well.

-- ArthurClemens - 15 Jun 2009

Retested on 1.0.5/1.0.6 while also using latest version of EditTablePlugin. Now the table is shown but EDITTABLE macro is not processed. Instead only the "code" line is shown.

EditTablePlugin and HolidaylistPlugin on 1.0.6.png
Issue with EditTablePlugin version 4.3 (14 Jun 2009)

-- IngoKappler - 26 Jun 2009

I can't explain it fully, but enabling the recursion block in the EditTablePlugin during HOLIDAYLIST expansion does the trick.

-- CrawfordCurrie - 02 Jul 2010
Topic revision: r15 - 07 Jul 2010, CrawfordCurrie
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