• 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.

While investigating a related problem (Bugs.Item1101), I realize that, the way getScriptUrl is currently written, either all or no scripts' path have to be defined in {ScriptUrlPaths}, for shorter-urls setup.

Intuitively, I had previously considered this variable as a way to define exceptions. What should it really do ? I tend to go on thinking it should allow to define exceptions to {ScriptUrlPath}.

Here is the patch that achieves this (against svn r7706) :

--- TWiki.pm.orig       2005-12-02 07:00:15.000000000 +0100
+++ TWiki.pm    2005-12-02 08:27:24.000000000 +0100
@@ -872,7 +872,7 @@
     # $this->{urlHost} is needed, see Codev.PageRedirectionNotWorking
     my $url;
-    if( defined $TWiki::cfg{ScriptUrlPaths} ) {
+    if( defined $TWiki::cfg{ScriptUrlPaths}{$script} ) {
         $url = $TWiki::cfg{ScriptUrlPaths}{$script};
     unless( $url ) {

No, the current code is correct. If at least one scripturlpath is defined, then $url is defined as the ScriptUrlPath for that script. If no path is set for that script, $url will be set to undef and the following code, which says unless($url), will trigger.


Summary {ScriptUrlPaths} should allow to define exceptions, but the current getScriptUrl implementation obliges the admin to define a path in it for every script or none.
ReportedBy BenVoui

SVN Range 7706
AppliesTo Engine

Priority Urgent
CurrentState No Action Required

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