Item5608: ScriptUrlPaths is not documented

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
Reported By: TWiki:Main.CrawfordCurrie
Waiting For:
Last Change By: KennethLavrsen
As far as I can tell, there is no doc describing the function of {ScriptUrlPaths} and no entry for it in TWiki.spec

There is some sideswipe documentation in TWiki:Codev.ShorterURLs and another mention in TWiki:Codev.ShorterUrlSupport, but that's all I can find.

-- TWiki:Main/CrawfordCurrie - 07 May 2008

BTW Markus: from http://twiki.org/cgi-bin/viewfile/Codev/GeorgetownReleaseMeeting2008x05x12?rev=2;filename=GeorgetownMinutes2008x05x12.txt [08/05/12 22:04] <uebera||> Someone could run grep on the repository and see who introduced it and whether it's commented. - that's how I found out it wasn't documented in the first place frown, sad smile

-- TWiki:Main.CrawfordCurrie - 13 May 2008

I feared that there may be no comment, but either it is used or not. If it is used, we can track down who committed the change and (while trying to analyse the code) ask the respective person what s/he wanted to achieve. If it is not used and cannot be found elsewhere in the code, it obviously doesn't serve a purpose (yet), so we can safely remove it for now, no? smile

-- TWiki:Main.MarkusUeberall - 13 May 2008

Update: From the comments in bin/twiki it looks as if the intention for {ScriptUrlPaths} was to control which script is to be called for individual 'actions' simply by changing/introducing a definition instead of moving/replacing the script residing in the default 'script directory' itself. Also, it is described/used accordingly in TWiki::getScriptUrl(.): "The default script url is taken from {ScriptUrlPath}, unless there is an exception defined for the given script in {ScriptUrlPaths}." However, as of 4.2.0, even if defined within LocalSite.cfg, these definitions don't show up on the TWiki Configuration page. This should at least be documented where {ScriptUrlPath} is defined.

Also, some plugins as well as the .htaccess.txt templates don't honor/mention the fact that a specific {ScriptUrlPaths}{script} definition could take precedence 'elsewhere' (i.e., wherever the above getScriptUrl(.) method is used instead)...

-- TWiki:Main.MarkusUeberall - 13 May 2008

Sounds good, Markus. How about having a go at drafting an entry in TWiki.spec that describes the parameter? I'd be happy to double-check what you write. It would make sense to add a not to .htaccess.txt as well. There's a good opportunity now to clear this up for 4.2.1.

Confirmed.

-- TWiki:Main.CrawfordCurrie - 16 May 2008

Not a release blocker.

Downgrading to Normal

-- TWiki:Main.KennethLavrsen - 27 May 2008

See also Tasks.Item947 I'm checking in an addition to Foswiki.spec to document ScriptUrlPaths}{view} as an "expert" config parameter, immediately after the ScriptUrlPath.

For now, will just check into trunk. This seems pretty benign, and we could probably add it to 1.0.10 as well.

-- GeorgeClark - 21 Jun 2010

Adding this showed that one unit test for TOC was buggy. Fixed the unit test (it was appending cfg{ScriptUrlPaths}{view} to the normal cfg{ScriptUrlPath}. If that was how it's supposed to be, then George, you need to fix both, but I highly doubt it smile

-- OlivierRaginel - 21 Jun 2010

Looks as though the FuncTests for getScriptUrl don't really handle short url's correctly either. They fail if {ScriptUrlPaths}{view} is set to ''. I'm also having trouble getting ScriptSuffix to work in FuncTests, but don't know if there is a bug here yet.

-- GeorgeClark - 22 Jun 2010

I may need to revert this. There is a problem I'm not sure how to get around.

The routine that expands "nested" parameters (Foswiki::Configure::Load.pm) expands null strings to the string 'undef', treating undefined, and defined but empty the same. The 'default' value for the {ScriptUrlPaths}{view} needs to be set to {ScriptUrlPath}/view{ScriptSuffix} so that if a suffix is configured, it is also appended to the default view script. However because of the way nested variables are expanded, the results becomes /bin/viewundef

I suspect that this is becoming a feature instead of simply defining an existing config variable.

-- GeorgeClark - 22 Jun 2010

Fixed Load.pm to only expand a variable to 'undef' if it is really undefined.

-- GeorgeClark - 22 Jun 2010

A couple of the unit tests fail if the web site is configured for Short URL's.

-- GeorgeClark - 24 Jun 2010
 

ItemTemplate edit

Summary ScriptUrlPaths is not documented
ReportedBy TWiki:Main.CrawfordCurrie
Codebase 1.0.9, 1.0.8, 1.0.7, 1.0.6, 1.0.5, 1.0.5 beta1, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0, 1.0.0 beta3, 1.0.0 beta2, 1.0.0 beta1, trunk
SVN Range TWiki-5.0.0, Sun, 04 May 2008, build 16770
AppliesTo Engine
Component
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:52bfab4602e8 distro:8cb57c76f6fe distro:c2d072f3d3c4 distro:ba9acfe06244 distro:1b59ee8ff406 distro:7f22062272be
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r19 - 04 Oct 2010, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy