Item13141: Whole table edit fails to save the table

pencil
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release:
Applies To: Extension
Component: EditRowPlugin
Branches: master
Reported By: GeorgeClark
Waiting For:
Last Change By: CrawfordCurrie
Created a simple table. See http://trunk.foswiki.org/Sandbox/TestTableEditMacro

Editing individual cells and individual rows work fine.

Click the whole table edit button, change a cell, and click the save icon. Table is not saved, but no errors are reported. Table used in the test topic:

%EDITTABLE{}%
| *A* | *B* |
| 1 | 2 |
| 335 | 41 |

I've traced the code and get down into EditRowPlugin::Table::saveTableCmd() however it appears to not process any rows. $this->{colTypes} is zero, and no rows are processed.

-- GeorgeClark - 14 Dec 2014

I had commented out a key section of code in a moment of ignorance.

-- CrawfordCurrie - 21 Dec 2014

Not fixed..... Now it crashes when trying to add a row, and also when trying to save an individual row edit: One step forward, two steps backward.

ERROR: (500) Internal server error - Use of uninitialized value $headRows in subtraction (-) at /usr/home/trunk.foswiki.org/core/lib/Foswiki/Plugins/EditRowPlugin/Table.pm line 470.
 at /usr/local/lib/perl5/5.16/CGI/Carp.pm line 379.
   CGI::Carp::realdie("Use of uninitialized value \$headRows in subtraction (-) at /u"...) called at /usr/local/lib/perl5/5.16/CGI/Carp.pm line 468
   CGI::Carp::die("Use of uninitialized value \$headRows in subtraction (-) at /u"...) called at /usr/home/trunk.foswiki.org/core/lib/AssertOn.pm line 15
   Assert::__ANON__("Use of uninitialized value \$headRows in subtraction (-) at /u"...) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/Plugins/EditRowPlugin/Table.pm line 470
   Foswiki::Plugins::EditRowPlugin::Table::_getColsFromURPs(Foswiki::Plugins::EditRowPlugin::Table=HASH(0x804a0b7f8), HASH(0x804a07828), 1) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/Plugins/EditRowPlugin/Table.pm line 512
   Foswiki::Plugins::EditRowPlugin::Table::saveTableCmd(Foswiki::Plugins::EditRowPlugin::Table=HASH(0x804a0b7f8), HASH(0x804a07828)) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/Plugins/EditRowPlugin/Table.pm line 576
   Foswiki::Plugins::EditRowPlugin::Table::saveData(Foswiki::Plugins::EditRowPlugin::Table=HASH(0x804a0b7f8), HASH(0x804a07828)) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/Plugins/EditRowPlugin/Table.pm line 596
   Foswiki::Plugins::EditRowPlugin::Table::addRowCmd(Foswiki::Plugins::EditRowPlugin::Table=HASH(0x804a0b7f8), HASH(0x804a07828)) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/Plugins/EditRowPlugin/Save.pm line 162
   eval {...} called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/Plugins/EditRowPlugin/Save.pm line 162
   Foswiki::Plugins::EditRowPlugin::Save::process(Foswiki=HASH(0x802e45e40), "EditRowPlugin", "save", Foswiki::Response=HASH(0x802e45f90)) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/Plugins/EditRowPlugin.pm line 79
   Foswiki::Plugins::EditRowPlugin::save(Foswiki=HASH(0x802e45e40), "EditRowPlugin", "save", Foswiki::Response=HASH(0x802e45f90)) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/Func.pm line 756
   Foswiki::Func::__ANON__(Foswiki=HASH(0x802e45e40), "EditRowPlugin", "save", Foswiki::Response=HASH(0x802e45f90)) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/UI/Rest.pm line 322
   Foswiki::UI::Rest::__ANON__() called at /usr/local/lib/perl5/site_perl/5.16/Error.pm line 421
   eval {...} called at /usr/local/lib/perl5/site_perl/5.16/Error.pm line 413
   Error::subs::try(CODE(0x8047e48b8), HASH(0x8047e4e28)) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/UI/Rest.pm line 337
   Foswiki::UI::Rest::rest(Foswiki=HASH(0x802e45e40)) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/UI.pm line 372
   Foswiki::UI::__ANON__() called at /usr/local/lib/perl5/site_perl/5.16/Error.pm line 421
   eval {...} called at /usr/local/lib/perl5/site_perl/5.16/Error.pm line 413
   Error::subs::try(CODE(0x80107f510), HASH(0x802e45948)) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/UI.pm line 498
   Foswiki::UI::_execute(Foswiki::Request=HASH(0x802db4738), CODE(0x802db4498), "rest", 1) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/UI.pm line 324
   Foswiki::UI::handleRequest(Foswiki::Request=HASH(0x802db4738)) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/Engine/CGI.pm line 98
   Foswiki::Engine::CGI::run(Foswiki::Engine::CGI=HASH(0x80213f6f0)) called at /home/trunk.foswiki.org/core/bin/rest line 29.

-- GeorgeClark - 21 Dec 2014

Crawford, I have no idea what's going on. I copied the problem topic to my local system and it works fine. But it consistently crashes on Foswiki.org.

See http://trunk.foswiki.org/Sandbox/TestEditTable

-- GeorgeClark - 11 Jan 2015

Completely different problem.

-- CrawfordCurrie - 12 Jan 2015
 
Topic revision: r5 - 12 Jan 2015, 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