[pmwiki-users] 404 Not Found

H. Fox haganfox at users.sourceforge.net
Tue Jan 24 17:27:56 CST 2006


On 1/24/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> I'm (finally) progressing on the 404 Page Not Found capabilities,
> as mentioned in http://www.pmwiki.org/wiki/PITS/00556 and one of
> the items to be completed for the 2.1 release.  However, I have
> a few questions and could use some opinions and advice...
>
> In current versions of PmWiki, when someone navigates to a
> non-existent page, they receive back a page that simply says
> "Describe {$FullName} here."
>
> I'm in the process of converting this so that the page will
> display the contents of Site.PageNotFound, and return a 404
> (Not Found) status code to the browser/robot.  Of course, this
> will all be configurable and customizable to do whatever an
> admin would like -- I'm looking for a good set of defaults.
>
> So, my first set of questions:
>   - What should be the contents of Site.PageNotFound?

If I understand correctly...

It should depend on whether the user is authorized to edit or not.

If the visitor isn't an author, the page should be something
appropriate that a web site visitor would see when they click a link
to a non-existent page.  There should be an option to put a "Moved
Permanently" or "Gone" message (or something else from
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) there.

Maybe there could be options to
* go back
* go to the site home page
* go to the group home page
* ???

If the visitor is an author there should be a message explaining that
the page doesn't exist, along with a helpful link so they may create
it.

>   - When the page is displayed, should it be using the group, title,
>     and skin of the requested (non-existent) page or should it use
>     Site.PageNotFound ?

My gut feeling is to say go with the group, title, and skin of the
requested (non-existent) page.

> Beyond this, there is a question about what to do when a partial
> or incomplete page name is requested.  For example, consider
> something like http://www.pmwiki.org/wiki/XYZ , where there's a
> simple string given that doesn't have any sort of group qualifier.
>
> Currently PmWiki defaults a url like the above as being a request
> for the first available of {$DefaultGroup}.XYZ, XYZ.XYZ, and
> XYZ.{$DefaultName}, and redirects the browser to the first of those
> that exist.  If none of those exist, it then displays version of
> Site.PageNotFound that asks the visitor to possible clarify the
> request a bit further.
>
> So, my question here is:  What should happen when an incomplete
> page name is given and PmWiki is unable to resolve the name to
> an existing page?

Again, it should depend on whether the visitor is an author or not (or
at least be able to).

One thing I've wanted for a while is for that page to show
non-edit-authorized visitors a simple description with a pagelist by
title, like

   Here are the pages in this section of the site:

       * A Page
       * Some Other Page
       * ...

If a visitor is authorized to edit they should be presented with a
chance to "customize" the group's home page using the default as a
template.

I'd prefer for the author not to be faced with a decision between
creating Group.Group and Group.HomePage.  It would be nice to be able
to choose one of those and have it be sued as the default when an
author clicks the helpful link to create a group home page.

Hagan




More information about the pmwiki-users mailing list