Return-Path: X-Original-To: apmail-incubator-jspwiki-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-jspwiki-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B4EF310482 for ; Wed, 5 Jun 2013 21:39:21 +0000 (UTC) Received: (qmail 28190 invoked by uid 500); 5 Jun 2013 21:39:21 -0000 Delivered-To: apmail-incubator-jspwiki-dev-archive@incubator.apache.org Received: (qmail 28150 invoked by uid 500); 5 Jun 2013 21:39:21 -0000 Mailing-List: contact jspwiki-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-dev@incubator.apache.org Delivered-To: mailing list jspwiki-dev@incubator.apache.org Received: (qmail 27990 invoked by uid 99); 5 Jun 2013 21:39:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jun 2013 21:39:21 +0000 Date: Wed, 5 Jun 2013 21:39:21 +0000 (UTC) From: =?utf-8?Q?Juan_Pablo_Santos_Rodr=C3=ADguez_=28JIRA=29?= To: jspwiki-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (JSPWIKI-777) JSPWiki converting all links to lead uppercase MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JSPWIKI-777?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D136= 76378#comment-13676378 ]=20 Juan Pablo Santos Rodr=C3=ADguez commented on JSPWIKI-777: ----------------------------------------------------- Hi Jim, if you go to http://ldapwiki.willeke.com/wiki/aFPServer and then anywhere e= lse e.g. http://ldapwiki.willeke.com/wiki/Main, the breadcrumb correctly di= splays 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 JSPWikiMa= rkupParser, lines 1631-1648: {code:java} else { // It's an internal Wiki link linkref =3D MarkupParser.cleanLink( linkref ); callMutatorChain( m_localLinkMutatorChain, linkref ); String matchedLink =3D linkExists( linkref ); if( matchedLink !=3D 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 doe= s the page name capitalization. This behaviour was added in {{r625070}} (Fe= b 21st, 2006) so, are there any chances you were using 2.2.x? (OTOH, aFPSer= ver page was created in 2011) Back to the question, rather than allowing lowercase links, which could hav= e unexpected side-effects (combination with camel-case, plugins, custom tag= s), I'd rather subclass {{VersioningFileProvider}} (the provider you're usi= ng at http://ldapwiki.willeke.com), overwritting the {{pageExists(..)}} met= hod so it gets something similar to: {code:java} public boolean pageExists( String pageName, int version ) { boolean exists =3D super.pageExists( pageName, version ); if( !exists )=20 { exists =3D super.pageExists(StringUtils.uncapitalize( pageName = ), version); } return exists; } {code} so you can use it on your {{jspwiki.properties}}. This way you'll be able t= o handle the non-standard page name convention, whereas markup and new page= s will be created following the standard behaviour.=20 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 solutio= n, you'll have to test yourself to see if it fulfils your requirements. hth, juan pablo =20 > 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 > Date: Tue, May 28, 2013 at 4:45 AM > Subject: Re: JSPWiki converting all links to lead uppercase > To: "jspwiki-user@incubator.apache.org" > 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 page= s. > 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 stabl= e > 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. (Sor= ry, 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 o= r both Linux (SLES 11 to 11.2) and TomCat (but still 6.x).=20 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira