-
Bug
-
Resolution: Fixed
-
Neutral
-
2.7
– Repro Steps. –
1. set the magnolia locale to ja (Japanese)
2. display calendar.
i.e.) display demo-project/news-and-events/events-overview.html
– Problem –
Calendar is not displayed correctry.
The following Exception occured.
ERROR ndering.engine.ModeDependentRenderExceptionHandler: Error while rendering [/demo-project/news-and-events/events-overview/extras/extras1/extrasItem0] with template [standard-templating-kit:components/extras/stkExtrasCalendar]: RenderException: java.lang.StringIndexOutOfBoundsException: String index out of range: 2
info.magnolia.rendering.engine.RenderException: java.lang.StringIndexOutOfBoundsException: String index out of range: 2
– Workaround –
1. edited /templating-kit/components/features/calendar
2. change
<th ${cmsfn.createHtmlAttribute('class', cssClass)}><abbr title="${date?string('EEEE')}">${date?string('EE')?substring(0,2)}</abbr></th>
to
<th ${cmsfn.createHtmlAttribute('class', cssClass)}><abbr title="${date?string('EEEE')}">${date?string('EE')}</abbr></th>
*omit substring method
– Reason –
When locale is ja, 'EE' format of Date outputs only one character. i.e. '月'