incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Pablo Santos Rodríguez (JIRA) <>
Subject [jira] [Commented] (JSPWIKI-777) JSPWiki converting all links to lead uppercase
Date Mon, 10 Jun 2013 22:14:20 GMT


Juan Pablo Santos Rodríguez commented on JSPWIKI-777:


the "FirstCharOfPageCaseInsensitiveVersioningFileProvider" effectively treats MyPage and myPage
as being the same page, but that was intented. My idea was to provide a fallback just in case
MyPage didn't exist, following in any other case the standard behaviour. Newer versions of
an uncapitalized page would get saved as capitalized ones. Also, this solution would be specific
to Jim's problem.

Didn't catch the Edit/Read link issue, as I'm testing under cygwin/windows I'm falling under
this all the time:
  File f1 = new File( "pom.xml" );
  File f2 = new File( "POM.XML" );
  System.out.println( "pom.xml: " + f1.exists() ); // yields pom.xml: true
  System.out.println( "POM.XML: " + f2.exists() ); // yields POM.XML: true
so my testing on this issue is somewhat limited :-/ , thought that was enough with overriding
pageExists(), but looks like these methods should also be overriden:
* getPageInfo
* getVersionHistory
* getPageText

And these ones _might_ be overriden (as we're facing autogenerated pages, they might not be
* deletePage: really needed?
* deleteVersion: really needed?
* movePage (save page so it gets capitalized + movePage should do the trick)

Again, this would be specific to Jim's issue, having page names on a non-standard format (=uncapitalized)

I'm focusing on making the changes only on the PageProvider, b/c I see it as a problem related
to how the pages are stored. If we're to open, or relax, the markup parsing, I'd prefer to
add a "case unsensitive" flag, as Jim also pointed, so TestPage, testPage, tEsTpAge and so
on are translated into the same page name (i.e. testpage); seems to me a more common use case
and also the next logical step to allowing uncapitalized page names.. WDYT?

Whatever solution we dive into apart, a final -drastic- -fast- -quick'n dirty approach- thought,
what about:

* making a copy of the dir holding the pages
* exec'ing some script or java class to traverse the pages dir, renaming all pages & needed
subfolders, something similar to:
# capitalize file name, leaving extensions aside
typeset -u t
typeset -l e
for f in *.*
  mv "$f" "$t.$e"
* deleting tomcat's work dir + lucene indexes
* restarting application?

can anyone make a quick test (i.e. manual renaming one file on step 2) to confirm if it works?
Windows testing yields positive results anyway.. 
> JSPWiki converting all links to lead uppercase
> ----------------------------------------------
>                 Key: JSPWIKI-777
>                 URL:
>             Project: JSPWiki
>          Issue Type: Improvement
>          Components: Core & storage
>    Affects Versions: 2.8.4, 2.9, 2.9.1
>            Reporter: Jim Willeke
>            Assignee: Harry Metske
>            Priority: Critical
>         Attachments: ff.patch
> ---------- Forwarded message ----------
> From: Markus Napp <>
> Date: Tue, May 28, 2013 at 4:45 AM
> Subject: Re: JSPWiki converting all links to lead uppercase
> To: "" <>
> Since I'm experiencing the same issue I wanted to chip in.
> By mistake I ended up copying the JSPWiki.jar from our (working) 2.8.2
> into an installation of 2.8.4.
> For whatever reason that solved the behavior. The version would then be
> displayed (as expected) as 2.8.2 but all the broken behavior from that
> version (collapsible lists don't work, change note overwriting all older
> change notes) were fixed and links would point reliably to lowercase pages.
> I get that "Camel Case" issue with 2.8.3 and 2.8.4 from the stable
> packages (fresh installation). We have an installation from the old stable
> 2.8.2 package that works just fine.
> Additional information:
> ---------- Forwarded message ----------
> From: Jim Willeke <>
> Date: Sun, May 26, 2013 at 3:17 PM
> Subject: Re: JSPWiki converting all links to lead uppercase
> To: JSPWiki Support <>
> We have version 2.8.4 and the condition we run into is:
> We created pages programmatically sometime back on an older version. (Sorry, do not know
what version) similar to:
> Now, when we have a link to this page:
and click the link for [aFPServer] we end up on being asked to create the page [AFPServer]
> So the [aFPServer] page is effectively orphaned never to be found again.
> No change in platform. Linux/Tomcat. I am sure we have changed versions or both Linux
(SLES 11 to 11.2)  and TomCat (but still 6.x). 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message