Recent Changes - Search:

PITS main list

edit sidebar

Main sidebar

PmWiki

pmwiki.org

00013

Summary: partial pagenames don't work in urls
Created: 2004-08-27 10:05
Status: Closed - fixed
Category: Bug
From: Pm
Assigned:
Priority: 55
Version:
OS:

Description: A partial page name in a URL, such as http://www.pmwiki.org/pmwiki2/pmwiki.php/Test, produces errors and doesn't go to the correct page.


Pm: Sep 12, 2004 -- the basic bug itself has been fixed, but now there is a question about where a partial URL should go if the group doesn't have an existing home page. From http://pmichaud.com/pipermail/pmwiki-users_pmichaud.com/2004-September/006526.html:

I have a question regarding the use of partial pagenames in URLs. As most of you know, PmWiki has long had a feature whereby a URL that specifies a WikiGroup but no pagename would be automatically taken to the home page of that group. For example:

   http://www.pmwiki.org/wiki/PmWiki
   http://www.pmwiki.org/wiki?pagename=PmWiki

are both automatically redirected to the PmWiki.PmWiki page, and

   http://www.pmwiki.org/wiki/Cookbook
   http://www.pmwiki.org/wiki?pagename=Cookbook

both automatically redirect to Cookbook.HomePage (since Cookbook.Cookbook doesn't exist, it goes to Cookbook.HomePage).

All of this works great if the WikiGroup has a default home page, but what *should* happen if the group doesn't exist or doesn't have a default home page? That is, where should

   http://www.pmwiki.org/wiki/Example

go if neither Example.Example nor Example.HomePage exist?

Currently PmWiki redirects to the $DefaultPage for the site ("Main.HomePage"). This is arguably wrong, but I haven't come up with an "obvious" alternative. The options I've come up with:

1.Redirect to Example.Example
This would prompt with "Describe Example? here."
2. Redirect to Example.HomePage
This would prompt with "Describe HomePage? here."
3. Redirect to Main.Example (a page named "Example" within group "Main")
This would prompt with "Describe Example? here."
4. Display a page indicating that the page (group?) they specified does not exist, and provide links to either create the new page or search the site
5. Redirect to the site's home page defined in $DefaultPage
6. ...?

Options #1-3 work okay, but are likely to confuse new visitors to the site who may have simply mistyped a URL. #4 seems like the best option, but I'm not exactly sure how it would be worded. #5 is the current situation.

Suggestions? How do you wish it would all work? Whatever we decide will be placed into PmWiki 2.0, and possibly be backported or provided as a Cookbook module for 1.0. (Actually, it's possible to create Cookbook modules to do any of the above, in case someone disagrees with PmWiki's default.)

Pm


Resolved by making use of Main.PageNotFound with appropriate explanation text and links to various other pages (option #4 above). --Pm

Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 11:56 AM