[pmwiki-users] off-topic: Behaviour of non-existiant home page (was: Nested groups)

Patrick R. Michaud pmichaud at pobox.com
Thu Jun 2 22:53:07 CDT 2005


On Thu, Jun 02, 2005 at 10:42:46PM -0400, Neil Herber wrote:
> At 2005-06-02  07:49 PM -0500, Patrick R. Michaud is rumored to have said:
> >Actually, this is already supposed to be PmWiki's default behavior,
> >but apparently it broke on some version in the past.  It's now fixed
> >on pmwiki.org -- see http://www.pmwiki.org/wiki/Test for an example.
> >
> >(The magic is in Main.PageNotFound -- currently it has a (:searchresults 
> >...:)
> >directive that is supposed to list the pages in the group, but that
> >no longer works.  Switching it to (:pagelist ...:) fixes things. )
> 
> For reasons I cannot fathom, neither of these work on my wiki.
> 
> If I enter this URL:
> http://neil.eton.ca/wiki/index.php/Main/NotHere
> 
> I get a page that invites me to enter the content of "NotHere".
> 
> If I enter this URL:
> http://neil.eton.ca/wiki/index.php/NotHere
> 
> I get the "PageNotFound" page (with pagelist markup), but no pages are 
> listed because there is no group=NotHere.
> 
> So it seems that if the group exists, PageNotFound is not displayed, and if 
> the group does not exist, no pages will ever be displayed by pagelist! 
> Catch-22.
> 
> What am I doing wrong?

Well, it's an incomplete test.  PageNotFound only comes
up when someone enters an partial page name and PmWiki is
unable to resolve it.  In the case of
http://neil.eton.ca/wiki/index.php/Main/NotHere
PmWiki has a complete page name (Main.NotHere) and so it takes 
the browser directly to that (empty) page.

In the case of http://neil.eton.ca/wiki/index.php/NotHere , PmWiki
isn't able to find any of NotHere.NotHere, NotHere.HomePage,
or Main.NotHere, so it generates the PageNotFound message.

The place where the pagelist works is when someone enters a group
name (e.g., NotHere) that has pages in the group but no "home" page
for the group.  In your example above, if you create pages in
the NotHere group (but not NotHere.NotHere, NotHere.HomePage, and
Main.NotHere) then PageNotFound will show you the pages in the NotHere
group so you can select which one you intended.

I'll be the first to admit that the current behavior isn't entirely
obvious, but I'm also uncertain as to what the better alternative is.
It doesn't seem entirely right to me that Main.PageNotFound appears
up for every non-existent page, but perhaps that's what it should
be.  (We'd also have to carefully consider webcrawler ramifications.)

Pm



More information about the pmwiki-users mailing list