Title: Railo 2 RC2 and sample apps
Thread: Railo 2 RC2 and sample apps
Forum: Bugs (ColdBox)
Conference: ColdBox
User: tschmitt
Hi,
I am testing Railo 2 RC2 (quite impressed so far) with Coldbox.
I
pulled down a fresh Coldbox package to CentOS and give the sample app main page
a try.
Now this may not technically be a Coldbox bug, but I figured I'd bring
it up and see if it can be accommodated.
I immediately receive an error in
the /samples/views/tags/i18n.cfm file line 10
[code]
<strong>I18NUtilDate:</strong> <br
/>#getPlugin("i18n").dateLocaleFormat(getPlugin("i18n").getVersion().I18NUtilDat
e)#<br>
[/code]
of: cant cast [23-aug-2006] to date value (for advanced
date parsing use function parseDateTime(String))
This traces back to the
i18n.cfc plugin line 80 where the "UtilDate" is set to a string of
"23-aug-2006" instead of a valid date object.
[code]
variables.instance.I18NUtilDate="23-aug-2006"; //should be date of latest
change
[/code]
For better(speed) or for worse, Railo does not automatically
cast a string to a date object like CF does and you have to use
parseDateTime(). The solution was:
[code]
<strong>I18NUtilDate:</strong> <br
/>#getPlugin("i18n").dateLocaleFormat(parseDateTime(getPlugin("i18n").getVersio
n().I18NUtilDate))#<br>
[/code]
I would think that the i18n.cfc should be
returning a valid CF date object.
Using the updated code, the main sample
page loaded instantly. Now on the the samples...
T