mraible opened a new pull request, #254:
URL: https://github.com/apache/roller/pull/254
While upgrading raibledesigns.com from 5.0.3 to 7.0, its custom theme lost
its entry list with nothing obvious in the page.
The theme calls `$utils.formatDate($entry.pubTime,
$text.get("macro.weblog.date.timestampFormat"))`. That key was removed after
5.0, so `$text.get` returns the key itself. `SimpleDateFormat` rejects it with
`Illegal pattern character 'c'`, and `VelocityRenderer` swaps the whole
template for `error-parse.vm`.
- `UtilitiesModel.formatDate` now catches the invalid pattern, logs a
warning once per pattern, and uses the locale's standard date and time format
(`DateFormat.LONG, DateFormat.SHORT`).
- `UtilitiesModelFormatDateTest` covers a valid pattern, the fallback, and
an entry list rendered through Velocity with the removed key. On master the
last two fail with the `MethodInvocationException` above.
- CHANGES.md gets the bug fix and a "Behaviour changes" note. Roller 5.1
removed the pre-3.0 macros in `WEB-INF/velocity/deprecated/`
(`#showWeblogEntries`, `#showBookmarks` and others) and referrer macros such as
`#showReferrersList`. A 5.0 template that calls one prints it as plain text.
Stubbing them isn't practical, since 5.0 had about 95 macros that are gone.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]