[pmwiki-users] RFC: capitalization collision handling

Patrick R. Michaud pmichaud at pobox.com
Mon Mar 12 07:59:35 CDT 2007


On Mon, Mar 12, 2007 at 09:27:37AM +0100, Oliver Betz wrote:
> The other, IMO more important problem, are typos. Users mistype the 
> case of a pagename and create a (link to a) new page instead of 
> referencing the existing page.

In the general case I don't think this happens all that frequently.
As already noted in another thread, all of the following link to
the same page:  

    [[wiki sandbox]]  [[Wiki Sandbox]]  [[Wiki sandbox]]
    [[Wiki Sandbox]]  [[WikiSandbox]]

See http://www.pmwiki.org/wiki/PmWiki/Links .

The only case that doesn't work is if an author writes something
like [[Wikisandbox]] or [[Wiki SandBox]], and with the exception of
"SideBar" versus "Sidebar", this doesn't happen all that frequently.

> Therefore I suggest to add a check with warning for capitalization 
> collisions
> * when pages are to be created (action=edit) for the name
> * when page text is submitted for the links
> * ...any place I missed?
> 
> Two possible methods for collision handling handle chime in:
> 
> 1. Simply _force_ links and pagenames to the existing capitalization. 
> ...

The problem is finding the "existing capitalization" -- at the moment
there's not an easy way to do this on case-sensitive filesystems
without doing a full scan of the wiki.d/ directory... and that can
be a very expensive operation.  

We could try to solve the problem using a variety of page indexes
and/or by changing the case of the page files in wiki.d/ .... but
this is really tricky in terms of maintaining compatibility with
existing sites.  And since there are a number of other issues 
having to do with the naming of page files in the filesystem 
(e.g., accented characters, page names with spaces), I've decided 
that it would be better to deal with the entire issue all at once
rather than build a piecemeal solution.  
(See http://www.pmwiki.org/wiki/PmWiki/RoadMap .)

Of course, if anyone knows of a fast way to do a case-insensitive
check for existence of a file on a case-sensitive filesystem,
that would be a big help.

Pm



More information about the pmwiki-users mailing list