[
https://issues.apache.org/jira/browse/JSPWIKI-777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13676378#comment-13676378
]
Juan Pablo Santos RodrÃguez commented on JSPWIKI-777:
-----------------------------------------------------
Hi Jim,
if you go to http://ldapwiki.willeke.com/wiki/aFPServer and then anywhere else
e.g. http://ldapwiki.willeke.com/wiki/Main, 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 1631-1648:
{code:java}
else
{
// 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() );
}
else
{
makeLink( EDIT, linkref, linktext, null, link.getAttributes() );
}
}
{code}
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
http://ldapwiki.willeke.com), overwritting the {{pageExists(..)}} method so it
gets something similar to:
{code:java}
public boolean pageExists( String pageName, int version )
{
boolean exists = super.pageExists( pageName, version );
if( !exists )
{
exists = super.pageExists(StringUtils.uncapitalize( pageName ),
version);
}
return exists;
}
{code}
so you can use it on your {{jspwiki.properties}}. 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 behaviour.
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.
hth,
juan pablo
> JSPWiki converting all links to lead uppercase
> ----------------------------------------------
>
> Key: JSPWIKI-777
> URL: https://issues.apache.org/jira/browse/JSPWIKI-777
> 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 <[email protected]>
> Date: Tue, May 28, 2013 at 4:45 AM
> Subject: Re: JSPWiki converting all links to lead uppercase
> To: "[email protected]" <[email protected]>
> 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 <[email protected]>
> Date: Sun, May 26, 2013 at 3:17 PM
> Subject: Re: JSPWiki converting all links to lead uppercase
> To: JSPWiki Support <[email protected]>
> 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:
> http://ldapwiki.willeke.com/wiki/aFPServer
> Now, when we have a link to this page:
> http://ldapwiki.willeke.com/wiki/2.16.840.1.113719.1.1.6.1.0 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: http://www.atlassian.com/software/jira