01220: Group homepages not resolved correctly when group only supplied

Summary: Group homepages not resolved correctly when group only supplied
Created: 2010-09-06 18:39
Status: Discussion
Category: Bug
From: simon
Assigned:
Priority: 5
Version: 2.2
OS: n/a

Description: Entry related to PITS:01178 "Group link Localization on pmwiki.org points to wrong page"

In pmwiki.tmpl

<div id='wikititle'>
          <div class='pagegroup'><a href='{$ScriptUrl}/{$Group}'>{$Group}</a> /</div>

does not work as expected and documented.

When $DefaultName is set the URL should work as follows.

        <div id='wikititle'>
          <div class='pagegroup'><a href='{$ScriptUrl}/{$Group}/{$DefaultName}'>{$Group}</a> /</div>

The fix is either to update the pmwiki.tmpl file,
or better fix the code internally

A conflict is possible if you have more than one page among Main.ABC, ABC.ABC, ABC.HomePage : then for the priority, see the variable $PagePathFmt and Cookbook:PagePaths. We cannot change the default order without breaking a number of wikis. --Petko September 06, 2010, at 07:41 PM

Can we please fix and have behaviour controlled by a flag (ie old broken behaviour the default until next major version) --simon July 14, 2012, at 05:11 PM

It is not broken and it is controlled by the variable $PagePathFmt. If you want a different order of priorities, set it in config.php. --Petko May 08, 2013, at 05:38 AM


(I should note that I am broadening this discussion to the whole naming & usage of $PagePathFmt as compared to $DefaultName.)

This is pretty non-intuitive, at least to me. If I change $DefaultName in my config.php then I fully expect pmwiki to start using that as the default name of my group home page. I would look long and hard before I searched for $PagePathFmt. I will take a couple minutes to update the documentation in a few places, but I think it would be worthwhile to consider a change of this behavior...

(Particularly I note that $DefaultName takes effect if the page exists but doesn't take effect if it doesn't exist ... this is just very counter-intuitive.)

Peter Bowers November 23, 2015, at 09:05 AM