You are here: Foswiki>Tasks Web>Item307 (29 Nov 2008, CrawfordCurrie)Edit Attach

Item307: Partial or corrupt configuration can break configure

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release:
Applies To: Engine
Component: Configure
Branches:
Reported By: MikePeck
Waiting For:
Last Change By: CrawfordCurrie
Bug report: configure not setting TemplatePath

I had an empty apache, and checked out of svn (rev=955), then linked http://host/foswiki to foswiki/core and ran 'pseudo-install.pl default'.

I then pointed a browser at http://host/foswiki/bin/configure, and filled in all the settings that looks right, especially the ones that had errors.

Then, after saving the configuration changes, I clicked the 'go to the foswiki front page' link (http://host/foswiki/bin/view/). This got me the error page:

Foswiki Installation Error
Template "oopsattention" not found.

Check the configuration settings for {TemplateDir} and {TemplatePath}. 

Looking in LocalSite.cfg, I see:

$Foswiki::cfg{TemplateDir} = '/d0/www/htdocs/foswiki/core/templates';

and

$Foswiki::cfg{TemplatePath} = 'NOT SET/$web/$name.$skin.tmpl, NOT SET/$name.$skin.tmpl, NOT SET/$web/$name.tmpl, NOT SET/$name.tmpl, $web.$skinSkin$nameTemplate, System.$skinSkin$nameTemplate, $web.$nameTemplate, System.$nameTemplate'; $Foswiki::cfg{LinkProtocolPattern} = '(file|ftp|gopher|https|http|irc|mailto|news|nntp|telnet)';

So, I went back to configure, and sure enough, TemplatePath isn't present on the form, after opening all options.

Sven suggested (in IRC) running pseudo-install.pl -f -A, and sure enough, that did work around the problem, so I've been able to get my instance up and running.
Does this happen when you install outside SVN as well? If it does, then it's a release blocker.

Flipped to urgent so we don;t forget it

-- CrawfordCurrie - 27 Nov 2008


I'm heading out of town for a week and a half, but if you haven't gotten to this before then, I'll try a release package, to see if it shows the problem as well.


OK, some analysis.
  1. You should not have had any errors, only warnings. Those warnings should have related to items auto-completed by configure.
  2. If you had just hit "next" it would have saved a new LocalSite.cfg it does for me
  3. The only way you can get a "NOT SET" is if you managed to saved a partial LocalSite.cfg that had some, or all, key values missing from it (or set to "NOT SET")
I was able to reproduce what you describe as follows:
  1. Make a new install
  2. echo "1;" > LocalSite.cfg
  3. run configure
  4. save
It's hard for configure to recover from an existing partial or corrupt configuration. Need to look at how to do that.

Reducing this to Normal, and fixing the headline (was "configure not setting TemplatePath")

-- CrawfordCurrie - 28 Nov 2008

On thinking about this further, I have decided that in the case where there is an existing LocalSite.cfg, but it doesn't set the key variables, then it needs to be treated as if it didn't exist.

-- CrawfordCurrie - 29 Nov 2008

I added a bunch of code to test for NOT SET. i can't reproduce the problem, so closing - please re-open if you can replicate the problem 9and provide details on how you did it)

-- CrawfordCurrie - 29 Nov 2008

ItemTemplate edit

Summary Partial or corrupt configuration can break configure
ReportedBy MikePeck
Codebase foswiki(trunk)
SVN Range 955
AppliesTo Engine
Component Configure
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:0e0a6174b105 distro:ed858ae76bb8
ReleasedIn
Topic revision: r10 - 29 Nov 2008, CrawfordCurrie
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