Tags:
create new tag
, view all tags

Bug: Uninitialized Value in Installed Plugins

Am testing new Cairo release and received the following error testing for InstalledPlugins via ..bin/view/TWiki/InstalledPlugins:

view: Use of uninitialized value in concatenation (.) or string at /test/web/twiki/lib/TWiki/Plugins.pm line 427.

Am assuming this is OK, if the test for failed plugins does not generate any errors.

However, made the following updates to Plugins.pm [$VERSION = '1.025'; # TWiki production release 01 Aug 2004]:

--- Plugins.pm   Mon Aug 16 21:07:37 2004
+++ Plugins.pm.new   Mon Aug 16 21:13:51 2004
@@ -423,9 +423,13 @@
       }
       $text .= " |\n";
    }
-
-   $text .= "<br />\n---++ Errors\n<br />\n<verbatim>\n$initialisationErrors\n</verbatim>\n";
-
+      $text .= "<br />\n---++ Errors\n<br />\n";
+      if ( $initialisationErrors ) {
+           $text .= "<verbatim>$initialisationErrors\n</verbatim>\n";
+      }
+      else {
+           $text .= "None.\n";
+      }    
    return $text;
 }

Test case

The previous error is generated in the CGI-Error log of the calling web server, after submitting http://..bin/view/Twiki/InstalledPlugins in the browser.

Environment

TWiki version: TWikiBetaRelease2004x07x30
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: zOS 1.4
Web server: IBM HTTP Server V5R3M0?
Perl version: 5.6.1
Client OS: MS Windows XP Pro
Web Browser: Mozilla/5.0 Firefox/0.9.3

-- StephenHahne - 17 Aug 2004

Follow up

Fix record

Thanks Stephen. This is now fixed and in SVN. I am not marking this as CairoRelease fix since it is a fix for a recent feature.

Index: Plugins.pm
===================================================================
--- Plugins.pm  (revision 1718)
+++ Plugins.pm  (working copy)
@@ -36,6 +36,8 @@

 $VERSION = '1.025'; # TWiki production release 01 Aug 2004

+$initialisationErrors = "";
+
 @registrableHandlers = (                 #                                      VERSION:
         'earlyInitPlugin',               # ( )                                   1.020
         'initPlugin',                    # ( $topic, $web, $user, $installWeb )  1.000
@@ -424,7 +426,9 @@
       $text .= " |\n";
    }

-   $text .= "<br />\n---++ Errors\n<br />\n<verbatim>\n$initialisationErrors\n</verbatim>\n";
+   my $err = $initialisationErrors;
+   $err = "None" unless $err;
+   $text .= "<br />\n---++ Errors\n<verbatim>\n$err\n</verbatim>\n";

    return $text;
 }

-- PeterThoeny - 17 Aug 2004

Topic revision: r2 - 17 Aug 2004 - 05:48:35 - PeterThoeny
Codev.UninitializedValueInInstalledPlugins moved from Codev.InstalledPlugins on 17 Aug 2004 - 05:47 by PeterThoeny - put it back
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback