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

Item5473: Initial value of {TemplatePath} should copy setting of {TemplateDir}

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine ConfigureScript Normal Confirmed   n/a  

Edit Form Data

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

Detail

This has cost me one hour of sweating and a Google search to find the answer in TWiki:Support.Perl5ErrorsTemplateProblem.

The inititial setting of {TemplatePath} contained cgi-bin so this resulted in a bogus path (with this provider the cgi-bin location is not where twiki is installed.

My suggestion is to create the initial value of {TemplatePath} based on {TemplateDir}.

And {MimeTypesFileName} should be based on {DataDir}.

-- TWiki:Main/ArthurClemens - 25 Mar 2008

It looks like it should. TWiki.spec says:

$TWiki::cfg{TemplatePath} = '$TWiki::cfg{TemplateDir}/$web/$name.$skin.tmpl, $TWiki::cfg{TemplateDir}/$name.$skin.tmpl, $TWiki::cfg{TemplateDir}/$web/$name.tmpl, $TWiki::cfg{TemplateDir}/$name.tmpl, $web.$skinSkin$nameTemplate, $TWiki::cfg{SystemWebName}.$skinSkin$nameTemplate, $web.$nameTemplate, $TWiki::cfg{SystemWebName}.$nameTemplate';

Perhaps something went wrong with my initial setup...

-- TWiki:Main/ArthurClemens - 25 Mar 2008

no, its one of the broken bits - the $TWiki::cfg{TemplateDir} bit is evaluated as it is written to the cfg file, and so when you later change {TemplateDir} configure doesn't have any way to know whats going on.

Unfortuanatly, we also can't just re-grab the {TemplatePath} from TWiki.spec as the user may have customised the {TemplatePath}.

Tis a problem, that may only be solveable by replacing the $TWiki::cfg{TemplateDir} with a non-perl based variable, that is then evaluated at when the cfg's are loaded into the running TWiki.

-- TWiki:Main.SvenDowideit - 30 Mar 2008

I'm not sure how {TemplatePath} comes to be saved with absolute paths in it in the first place. I intended that such "derived" variables should be expanded at run-time - hence the single quotes - but this seems to be broken.

The problem is with configure - this situation should never arise, IMHO.

-- CrawfordCurrie - 27 May 2008

ItemTemplate
Summary Initial value of {TemplatePath} should copy setting of {TemplateDir}
ReportedBy TWiki:Main.ArthurClemens
Codebase 4.2.0, ~twiki4
SVN Range TWiki-5.0.0, Sun, 09 Mar 2008, build 16496
AppliesTo Engine
Component ConfigureScript
Priority Normal
CurrentState Confirmed
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2008-05-27 - 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