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 Wed, 05 Jun 2013 21:39:21 GMT


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

Hi Jim,

if you go to and then anywhere else e.g.,
the breadcrumb correctly displays the link. Same for Page Index, Unused and Undefined Pages,
no matter if the page name is capitalized or not.

Done some archeology, seems the culprit of this behaviour lies in JSPWikiMarkupParser, lines

        // It's an internal Wiki link
        linkref = MarkupParser.cleanLink( linkref );

        callMutatorChain( m_localLinkMutatorChain, linkref );

        String matchedLink = linkExists( linkref );

        if( matchedLink != null )
            makeLink( READ, matchedLink, linktext, null, link.getAttributes() );
            makeLink( EDIT, linkref, linktext, null, link.getAttributes() );

especifically the call to {{MarkupParser.cleanLink( linkref );}}, which does the page name
capitalization. This behaviour was added in {{r625070}} (Feb 21st, 2006) so, are there any
chances you were using 2.2.x? (OTOH, aFPServer page was created in 2011)

Back to the question, rather than allowing lowercase links, which could have unexpected side-effects
(combination with camel-case, plugins, custom tags), I'd rather subclass {{VersioningFileProvider}}
(the provider you're using at, overwritting the {{pageExists(..)}}
method so it gets something similar to:

    public boolean pageExists( String pageName, int version )
        boolean exists = super.pageExists( pageName, version );
        if( !exists ) 
            exists = super.pageExists(StringUtils.uncapitalize( pageName ), version);
        return exists;

so you can use it on your {{}}. This way you'll be able to handle the non-standard
page name convention, whereas markup and new pages will be created following the standard

Unfortunately, right now I don't have access to a Unix/Linux box to perform the required testing,
so unless other team members can verify this solution, you'll have to test yourself to see
if it fulfils your requirements.

juan pablo
> JSPWiki converting all links to lead uppercase
> ----------------------------------------------
>                 Key: JSPWIKI-777
>                 URL:
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Core & storage
>    Affects Versions: 2.8.4
>            Reporter: Jim Willeke
>            Assignee: Harry Metske
>            Priority: Critical
> ---------- 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