Item14000: Wrong row is deleted by EditRowPlugin in full table edit mode.
Priority: Normal
Current State: Closed
Released In: 2.1.1
Target Release: patch
When editing the full table and clicking the "minus", the second-last row is deleted. It is expected that the last row is deleted instead.
the POST request sends
erp_row=-1
to the server, where in Table.pm in sub
deleteRowCmd
, the row to delete is selected as
my $row =
$urps->{erp_row} >= 0
? $urps->{erp_row}
: $this->totalRows() + $urps->{erp_row} -1;
return unless $this->deleteRow($row);
As 1 is the index of the first row, this selects the second last row. It works fine when removing the -1:
my $row =
$urps->{erp_row} >= 0
? $urps->{erp_row}
: $this->totalRows() + $urps->{erp_row};
return unless $this->deleteRow($row);
--
PhilippHoppen - 01 Mar 2016
Thanks for the fix! This will be picked up in Foswiki 2.1.1.
--
GeorgeClark - 01 Apr 2016