• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

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

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension TopicTranslationsPlugin Normal New   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

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

ItemTemplate
Summary ENV{SCRIPT_NAME} problem at the command line usage
ReportedBy TWiki:Main.AurelioAHeckert
Codebase 4.2.1, ~twiki4
SVN Range TWiki-5.0.0, Sun, 01 Jun 2008, build 16865
AppliesTo Extension
Component TopicTranslationsPlugin
Priority Normal
CurrentState New
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2008-08-02 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback