Priority: Normal
Current State: Closed
Released In: 1.0.7
Target Release: patch
Applies To: Engine
Component: Configure
Branches:
Error Output
Use of uninitialized value in pattern match (m//) at /data/foswiki/lib/Foswiki/Configure/UIs/EXTENSIONS.pm line 160.
Summary
It was long since I upgraded our wiki. We moved from TWiki 4.1.3 to 4.3.0. After the upgrade I searched for 'Best of Twiki' in Google. That's how I came to know about the Fork. I appraised my seniors about this and we decided to go with FOS. So I am here upgrading my wiki from TWiki 4.3.0 to Foswiki 1.0.5.
How to Recreate it
- On the configure page click on 'Find More Extensions' button for installing plugins.
- Installed ChartPlugin and it works fine.
- Installed GaugePlugin and it worked fine.
- After that when I click on 'Find More Extensions', I get the above error.
Steps taken to Correct
- Went to the root directory of the wiki.
- Manually uninstalled it by running the Gauge_installer script with 'uninstall' parameter.
- After that browsed the configure page and clicked on 'Find More Extensions' and it displayed the list of extensions. It worked fine.
Observation & Suggestions
- It looks like the error was caused by GaugePlugin. However I don't have any definite data to prove this.
- On a different thread, it would be great if there was an option from the front end(browser - configure page) to uninstall plugins.
I have come across this also, The cause I have found is the description in the extension feed at
http://foswiki.org/Extensions/FastReport?skin=text
, it contains '}' which closes the record too early and the version value isn't being populated.
{ topic: GaugePlugin
description: Build dashboards that contain graphical images of gauges defined with =%GAUGE{}%= variables.
compatibility: Foswiki >= 1.0
classification: Interface and Visualisation
version: 3178 (2009-03-18)
}
My fix was to modify the regex to specify a newline and some whitespace before the closing bracket
{(.*?)\n\s+}
, which works for this case:
--- lib/Foswiki/Configure/UIs/EXTENSIONS.pm 2009-05-08 14:38:03.000000000 +1000
+++ lib/Foswiki/Configure/UIs/EXTENSIONS.pm.orig 2009-03-20 07:17:12.000000000 +1100
@@ -50,7 +50,7 @@
my $response = $this->getUrl($url);
if ( !$response->is_error() ) {
my $page = $response->content();
- $page =~ s/{(.*?)\n\s+}/$this->_parseRow($1, $place)/ges;
+ $page =~ s/{(.*?)}/$this->_parseRow($1, $place)/ges;
}
else {
push(
--
SimonHarrison - 08 May 2009
I don't see an error with 1.0.7 or 1.1, though the short description is incorrect. I have fixed it using a method simiar to the one Simon suggests.
--
CrawfordCurrie - 20 Sep 2009