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.
You are here: Tasks Web>Item5692 (21 Jul 2009)

Item5692: ENV{SCRIPT_NAME} problem at the command line usage

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Extension TopicTranslationsPlugin  
If you install the TWiki:Plugins.TopicTranslationsPlugin you will get this error:
Use of uninitialized value in pattern match (m//) at /var/www/twiki/lib/TWiki/Plugins/TopicTranslationsPlugin.pm line 266.
when run mailnotify or tick_twiki.pl.

This error is on this line:

if (($ENV{SCRIPT_NAME} =~ m#/view(auth)?$#) and (! $ENV{QUERY_STRING})) {

You can simply add this line before the line 266:

$ENV{SCRIPT_NAME}='' if ! $ENV{SCRIPT_NAME};

Is important not to trow unuseful warnings because this will generate logs to the webmaster. A lot of log will difficult to see really important errors and may be a security problem.

Other plugins may have this same problem...
May be better to add $ENV{SCRIPT_NAME}='' if ! $ENV{SCRIPT_NAME}; inside a base twiki file to clean this problem.


No, it would not. The fact that $ENV{SCRIPT_NAME} is undef is used in some places to detect when the script is being run from the command line.

The plugin should not fail when it is undef.

Reassigned to TopicTranslationsPlugin.

-- CrawfordCurrie - 02 Aug 2008

Better late than never. This problem is fixed in the newest plugin release.

-- AntonioTerceiro - 21 Jul 2009

ItemTemplate edit

Summary ENV{SCRIPT_NAME} problem at the command line usage
ReportedBy TWiki:Main.AurelioAHeckert
Codebase
SVN Range TWiki-5.0.0, Sun, 01 Jun 2008, build 16865
AppliesTo Extension
Component TopicTranslationsPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins Foswikirev:4517
TargetRelease n/a
ReleasedIn
Topic revision: r4 - 21 Jul 2009 - 19:08:13 - AntonioTerceiro
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads