NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use
trunk.foswiki.org to view this page for some minimal testing.
Use
Item11383 for general documentation changes for release 1.1.5. Use
Item9693 for docu changes for release 2.0.
Item1101: TablePlugin Sort error
| Priority: |
CurrentState: |
AppliesTo: |
Component: |
WaitingFor: |
| Low |
No Action Required |
Extension |
TablePlugin |
|
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