Item13570: EditRowPlugin does not work on page with TABLE macro.
Priority: Urgent
Current State: Closed
Released In: 2.0.2
Target Release: patch
When I first time heard that you had to remove the
EditTablePlugin I was very worried. And when I tested it everything was broken. I raised on bug items on it.
And it is still totally broken. Nothing works!
This is an example of a schedule table that we have in probably 2000 topics on our 1.1.9 Foswiki.
We use exactly this format in meeting minutes. In status reports that are copied each month. In bug reports. So many places that it would be impossible for me to go a fix any small uncompatible detail.
I do not think this table is very complex or special. It is a plain simple EDITTABLE with a simple format.
Here are the problems
- The plugin adds two edit buttons. One on the top. One on the bottom.
- The top edit button when clicked just adds one single new edited line and ignored the existing table
- The bottom edit button puts the table in edit mode and ignored all the formatting. All fields are just fixed text fields
- The edit button on each row edits the row alright but also ignores the format
Pretty broken, right? I personally would not have released Foswiki with this plugin in this state.
Update. When removing the TABLE macro the ERP works much better.
I have to remove the TABLE tag completely from the page. Even a tag below causes issues. And removing the initsort makes no difference either
--
KennethLavrsen - 28 Jul 2015
Workaround:
Confirming, but not for 2.0.1
--
GeorgeClark - 30 Jul 2015
I have made a little supplement test case.
TestCaseItem13570
--
Main.KennethLavrsen - 06 Aug 2015 - 11:36
Reading code I can see that the tag problem comes about from a fix put in for
Item13309. That report was addresses at breakneck speed, and we're now paying the price. The problem comes about because while it is easy for the core table parser to merge attributes from a preceding TABLE tag, it doesn't
know about any tag declared by a plugin so can't know to merge an
EDITTABLE tag. Considering a couple of possible solutions, but I fear this isn't easy to fix
--
Main.CrawfordCurrie - 21 Aug 2015 - 14:02
There are huge problems with the fix you just checked in.
When I have a simple table with one EDITTABLE tag and I edit the table with the
TableRowPlugin and save. the EDITTABLE macro is deleted.
If I have TABLE and EDITTABLE on same page multiple times the software chokes with
Foswiki detected an internal error - please check your Foswiki logs and webserver logs for more information.
Can't locate object method "new" via package "Foswiki::Table" (perhaps you forgot to load "Foswiki::Table"?)
--
KennethLavrsen - 27 Aug 2015
The internal error happens on a page with two tables, each with a TABLE/EDITROW pair and the
EditRowPlugin macro changed from EDITTABLE to EDITROW in configure.
EditTablePlugin is disabled in this case
Trace log
[Thu Aug 27 13:44:50.769393 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: [Thu Aug 27 13:44:50 2015] view: Use of uninitialized value $text in substitution (s///) at /var/www/foswikidev/core/lib/Foswiki/Plugins/InterwikiPlugin.pm line 90., referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.924478 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: Can't locate object method "new" via package "Foswiki::Table" (perhaps you forgot to load "Foswiki::Table"?) at /var/www/foswikidev/core/lib/Foswiki/Plugins/EditRowPlugin/Table.pm line 53., referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.924536 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: at /var/www/foswikidev/core/lib/Foswiki/Plugins/EditRowPlugin/Table.pm line 53., referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.924578 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::Plugins::EditRowPlugin::Table::new('Foswiki::Plugins::EditRowPlugin::Table', 'ARRAY(0x4ab9d88)') called at /var/www/foswikidev/core/lib/Foswiki/Tables/Reader.pm line 250, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.924618 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::Tables::Reader::open_table('Foswiki::Plugins::EditRowPlugin::TableParser=HASH(0x4ab9c68)') called at /var/www/foswikidev/core/lib/Foswiki/Tables/Reader.pm line 143, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.924647 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::Tables::Reader::__ANON__('open_table') called at /var/www/foswikidev/core/lib/Foswiki/Tables/Parser.pm line 221, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.924699 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::Tables::Parser::parse('%TABLE{columnwidths="320,140,140,300" dataalign="left,center,...', 'CODE(0x4ab9de8)') called at /var/www/foswikidev/core/lib/Foswiki/Tables/Reader.pm line 146, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.924765 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::Tables::Reader::parse('Foswiki::Plugins::EditRowPlugin::TableParser=HASH(0x4ab9c68)', '%TABLE{columnwidths="320,140,140,300" dataalign="left,center,...', 'Foswiki::Meta=HASH(0x41f76b8)') called at /var/www/foswikidev/core/lib/Foswiki/Plugins/EditRowPlugin/TableParser.pm line 41, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.924837 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::Plugins::EditRowPlugin::TableParser::parse('Foswiki::Plugins::EditRowPlugin::TableParser=HASH(0x4ab9c68)', '%TABLE{columnwidths="320,140,140,300" dataalign="left,center,...', 'Foswiki::Meta=HASH(0x41f76b8)', 'HASH(0x4ab9a10)') called at /var/www/foswikidev/core/lib/Foswiki/Plugins/EditRowPlugin/View.pm line 61, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.924895 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::Plugins::EditRowPlugin::View::process('%TABLE{columnwidths="320,140,140,300" dataalign="left,center,...', 'Sandbox', 'TestTopic1', 'Foswiki::Meta=HASH(0x41f76b8)') called at /var/www/foswikidev/core/lib/Foswiki/Plugins/EditRowPlugin.pm line 86, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.924951 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::Plugins::EditRowPlugin::commonTagsHandler('%TABLE{columnwidths="320,140,140,300" dataalign="left,center,...', 'TestTopic1', 'Sandbox', 0, 'Foswiki::Meta=HASH(0x41f76b8)') called at /var/www/foswikidev/core/lib/Foswiki/Plugin.pm line 310, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.925014 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::Plugin::invoke('Foswiki::Plugin=HASH(0x30b3670)', 'commonTagsHandler', '%TABLE{columnwidths="320,140,140,300" dataalign="left,center,...', 'TestTopic1', 'Sandbox', 0, 'Foswiki::Meta=HASH(0x41f76b8)') called at /var/www/foswikidev/core/lib/Foswiki/Plugins.pm line 380, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.925076 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::Plugins::dispatch('Foswiki::Plugins=HASH(0x30b31c0)', 'commonTagsHandler', '%TABLE{columnwidths="320,140,140,300" dataalign="left,center,...', 'TestTopic1', 'Sandbox', 0, 'Foswiki::Meta=HASH(0x41f76b8)') called at /var/www/foswikidev/core/lib/Foswiki.pm line 3625, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.925125 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::expandMacros('Foswiki=HASH(0x30b2f20)', '%TABLE{columnwidths="320,140,140,300" dataalign="left,center,...', 'Foswiki::Meta=HASH(0x41f76b8)') called at /var/www/foswikidev/core/lib/Foswiki/Meta.pm line 3353, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.925170 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::Meta::expandMacros('Foswiki::Meta=HASH(0x41f76b8)', '%TABLE{columnwidths="320,140,140,300" dataalign="left,center,...') called at /var/www/foswikidev/core/lib/Foswiki/UI/View.pm line 479, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.925226 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::UI::View::_prepare('%TABLE{columnwidths="320,140,140,300" dataalign="left,center,...', 'Foswiki::Meta=HASH(0x41f76b8)', 0) called at /var/www/foswikidev/core/lib/Foswiki/UI/View.pm line 459, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.925255 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::UI::View::view('Foswiki=HASH(0x30b2f20)') called at /var/www/foswikidev/core/lib/Foswiki/UI.pm line 374, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.925275 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::UI::__ANON__() called at /usr/share/perl5/vendor_perl/Error.pm line 419, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.925292 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \teval {...} called at /usr/share/perl5/vendor_perl/Error.pm line 411, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.925320 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tError::subs::try('CODE(0x22f1ea0)', 'HASH(0x316ba20)') called at /var/www/foswikidev/core/lib/Foswiki/UI.pm line 500, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.925355 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::UI::_execute('Foswiki::Request=HASH(0x22f9738)', 'CODE(0x2e2e3a8)', 'view', 1) called at /var/www/foswikidev/core/lib/Foswiki/UI.pm line 326, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.925386 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::UI::handleRequest('Foswiki::Request=HASH(0x22f9738)') called at /var/www/foswikidev/core/lib/Foswiki/Engine/CGI.pm line 99, referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[Thu Aug 27 13:44:50.925414 2015] [cgi:error] [pid 23818] [client 10.172.3.72:59585] AH01215: \tFoswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x2992130)') called at /var/www/foswikidev/core/bin/view line 29., referer: http://10.172.3.71/foswikidev/bin/edit/Sandbox/TestTopic1?t=1440675711;nowysiwyg=1
[root@foswikidev httpd]#
--
KennethLavrsen - 27 Aug 2015
Above test case also fails with 1 table and only the EDITROW macro. it seems the plugin now longer works with alternative macro. I plan to try and run with both plugins (but not on the same topic) so I like the idea that I can redefine the macro for
EditRowPlugin
This bug was not there before the fix so that is why I just update the existing report.
--
KennethLavrsen - 27 Aug 2015
Fixed the crash. wrong class name used. But the disappearing EDITTABLE issue still exists.
--
GeorgeClark - 27 Aug 2015
Latest update from distro:e0f5ba59ba75 fixes the eating of the EDITTABLE macro but when I redefine the {Plugins}{EditRowPlugin}{Macro} to EDITROW the plugin does not work. The macro is interpreted to nothing and the table cannot be edited.
--
KennethLavrsen - 02 Sep 2015
It is the hardcoding of Table.pm line 50 that causes the problem. It uses a hardcoded string. When I replace EDITTABLE by $Foswiki::cfg{Plugins}{EditRowPlugin}{Macro} then it all works.
--
KennethLavrsen - 02 Sep 2015
Feedback during Sept. 7 release meeting. Issues reported here are resolved.
--
GeorgeClark - 07 Sep 2015