[pmwiki-users] $DefaultGroup and Name
Marc Cooper
gmane at auxbuss.com
Tue Sep 12 13:37:32 CDT 2006
Patrick R. Michaud said...
> On Mon, Sep 11, 2006 at 11:05:04PM +0100, Marc Cooper wrote:
> > Hi,
> >
> > I can't figure out why $DefaultGroup and $DefaultName are not taking for
> > my fields. In the fields' /local/config.php, I have something like
> >
> > $DefaultGroup = 'Fred';
> > $DefaultName = 'HomePage';
> >
> > (I also tried: $DefaultPage = 'Fred.HomePage'; )
> >
> > But when I use the URL, say:
> >
> > http://example.com/pmwiki/fieldname/
> >
> > the result is Main/HomePage.
> >
> > Neither of these fields is referenced in the farmconfig.php.
>
> What *is* in the farmconfig.php?
A lot of stuff :-) 140-odd lines and then it includes farmrecipes.php
with another 50-odd lines. The field's local/config.php is only a few
lines, though.
> If it's calling authuser.php, or if it or any scripts it calls
> makes any calls to ResolvePageName(), then the values of
> $DefaultPage and the pagename are being set before your field's
> local/config.php has a chance to change them.
Ah! That'll be it then. The first lines of farmrecipes.php are:
include_once("$FarmD/cookbook/dbauth.php");
include_once("$FarmD/scripts/authuser.php");
$Author = $AuthId;
Thinks: If authuser.php is the problem, I'm happy to add a field
specific include prior to calling it.
> I can get you a configuration that will work; but need more
> details about what's happening in the farmconfig.php in order
> to do that.
Okay. I'm not doing anything tricky, the vast majority of it is setting
variables for passwords, searches, uploads, notify and a few markup
overrides. Then there are the recipes.
I'm happy to email the files to you, if it helps.
> P.S.: For those who may be thinking "why can't PmWiki figure this
> out on its own", I'll just say that managing dependencies between
> configuration scripts is a very difficult problem in general,
> so there are a few things that PmWiki leaves to the wiki administrator
> to figure out. Getting the correct value of $pagename is one
> of them. :-(
I dug out a few messages from the archives that indicated that this
wasn't an easy issue.
If it makes it easier, I can live with only changing $DefaultGroup.
Though, I suspect this doesn't change things.
If the worst comes to the worst, I can use an Apache rewrite, I suspect.
--
Best,
Marc
More information about the pmwiki-users
mailing list