[pmwiki-users] get rid of group Main from url

Patrick R. Michaud pmichaud at pobox.com
Wed Nov 8 12:37:08 CST 2006


On Wed, Nov 08, 2006 at 12:32:20PM -0600, JB wrote:
> * Patrick R. Michaud wrote, On 11/8/2006 11:30 AM:
> > Your farmconfig.php script is calling ResolvePageName() 
> > before the value of $PagePathFmt has been set in config.php.
> > Thus, ResolvePageName() is treating "?n=SomeName" as being
> > a reference to the SomeName group instead of Main.SomeName.
> 
> 
> Commenting out these 3 lines made it work correctly!
> Thanks to PM and Anno and Stirling.
> 
>      #$pagename = ResolvePageName($pagename);
> 
>      #if ($pagename == 'Site.SideBar' && $action=='browse')
>      Redirect($DefaultPage);
> 
>      #if ($pagename == 'Main.SideBar' && $action=='browse')
>      Redirect($DefaultPage);
> 
> Is there a way to make PMWiki return to the last page viewed
> after editing the menu, a way that is compatible with these
> "get rid of main" routines?

Sure -- the problem isn't an incompatibility with redirect,
it's just that the setting of $PagePathFmt needs to take
place before any calls to ResolvePageName().

Pm




More information about the pmwiki-users mailing list