Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323224

Summary: Mediawiki template resolver should not get lowercased template name
Product: z_Archived Reporter: Jarno Elovirta <jarno>
Component: MylynAssignee: David Green <greensopinion>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jarno
Version: unspecified   
Target Milestone: 1.4.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Jarno Elovirta CLA 2010-08-20 06:03:12 EDT
Build Identifier: 1.4.0.I20100805-0500-e3x

When an implementation of org.eclipse.mylyn.wikitext.mediawiki.core.TemplateResolver is called to resolve a template, the template name is lowercased before passed to resolveTemplate method. When the original case of the template is lost, this causes problems with e.g.

1. Magic words [1] cannot be detected, as they are case-sensitive
2. Templates with camel-case names cannot be correctly processed. E.g. When the template name is SeeAlso, if one tries to resolve it with org.eclipse.mylyn.internal.wikitext.mediawiki.core.WikiTemplateResolver, wiki server is queried with "seealso" which in turn is normalized to "Seealso", and will result in page not found.

Thus TemplateResolver#resolveTemplate method should receive the template name with the original case. The template resolver can then lowercase the template name internally for map lookup if needed.

[1] http://www.mediawiki.org/wiki/Help:Magic_words


Reproducible: Always
Comment 1 David Green CLA 2010-09-01 10:45:44 EDT
I've committed a fix to CVS.  Please git it a try and verify that it works as expected.
Comment 2 David Green CLA 2010-09-01 10:46:55 EDT
Created attachment 177962 [details]
mylyn/context/zip
Comment 3 David Green CLA 2010-09-09 14:35:31 EDT
Fixed. Please reopen this bug if needed