Item1101: TablePlugin Sort error
Priority: Low
Current State: No Action Required
Released In: n/a
Target Release:
The following simple table gets an error on my installation - here not!?
I have looked at the tasks with
TablePlugin and didn't found such a Problem.
A |
B |
2 |
5 |
1 |
2 |
3 |
0 |
Playing around with this table:
- 0 Error: Foswiki detected an internal error - please check your Foswiki logs and webserver logs for more information.
Use of uninitialized value in numeric comparison (<=>)
Use of uninitialized value in numeric comparison (<=>) at /mnt/wiki/foswiki/lib/Foswiki/Plugins/TablePlugin/Core.pm line 1353.
- 1 or other value -> it works
So it is not a problem of TablePlugin alone, more likely a combination of your setup and the plugin.
--
ArthurClemens - 20 Feb 2009
Hm - I tried some config changes and the
$Foswiki::cfg{WarningsAreErrors} = 1;
seems to be my table problem - set it to "0" and it runs ...
I have set it in my development time (
ShibbolethLogon and out wiki-based CMS).
I doesn't think to get trouble with it with stable foswiki parts and yes I forgot the setting.
The error is now in the apache error-log:
[Fri Feb 20 18:52:32 2009] [error] [client 134.109.233.1] [Fri Feb 20 18:52:32 2009] view: Use of uninitialized value in numeric comparison (<=>) at /mnt/wiki/foswiki/lib/Foswiki/Plugins/TablePlugin/Core.pm line 1353.
--
GuentherFischer - 20 Feb 2009
--- Core.pm (revision 2536)
+++ Core.pm (working copy)
@@ -751,7 +751,7 @@
my $date = '';
my $columnIsValid = 0;
foreach my $row (@curTable) {
- next if ( !$row->[$col]->{text} );
+ next unless defined($row->[$col]->{text});
# else
$columnIsValid = 1;
0 is false in boolean context; hence I believe
if ( !$row->[$col]->{text} );
is the wrong test.
--
ChristianLudwig - 20 Feb 2009
Doesn't happen in recent code, so must have been refactored out.
--
ArthurClemens - 05 Mar 2011