I've found three problems with the
\farcry_core\admin\reporting\statsVisitors.cfm. I have solved two of
them, but will relate them here in case they contribute to the third
problem:

1) On line 145 a <cfpraam> tag attempts to add 1 to the now() function:

<cfparam name="form.before" default="#now()+1#">

which results in the following number: 38919.5970602

When the value of this number is used in the form field on line this
creates a date of "Wednesday, 31 December 1969". I corrected this by
changing line

145 to have a dateAdd function:

<cfparam name="form.before" default="#dateadd("d",1,now())#">

2) On line 167 the code attempts to convert a comma delimited list to
an array that will be used by the cfchart on line 173:

<cfset
subS=listToArray('#application.thisCalendar.i18nDateFormat(form.after,session.dmProfile.locale,application.fullF)#,#application.thisCalendar.i18nDateFormat(form.before,session.dmProfile.locale,application.fullF)#')>

However, the dates can have commas in them, so the array is incorrect.
I corrected this by changing the list to be delimited by a pipe symbol
(|):

<cfset
subS=listToArray('#application.thisCalendar.i18nDateFormat(form.after,session.dmProfile.locale,application.fullF)#|#application.thisCalendar.i18nDateFormat(form.before,session.dmProfile.locale,application.fullF)#',
"|")>

3) When I attempt to submit the form at the bottom, I get the following
error information:

Error:
Cannot format given Object as a Date null
The error occurred on line 172.

Date/Time: 07/20/2006 02:23 PM
Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322; InfoPath.1)
QueryString:
FieldList:
AFTER
BEFORE

After a bit of digging I determined that the error is being caused when
the dates are passed to the application.thisCalendar.i18nDateFormat()
function

in line 167, it calls the file
\farcry_core\packages\farcry\gregorianCalendar.cfm. Line 172 of this
file is calling a dateFormat method in the Java

class java.text.DateFormat and throws the error. I think it is because
it thinks it is not getting a valid date; however, I have thrown
isDate()

functions into the statsVisitors.cfm file and ColdFusion thinks it is a
date.

If I remove all the changes I made to fix problems 1 and 2, the error
changes to the following:

Error:
The value "Wednesday, 31 December 1969" could not be converted to a
date.
The error occurred on line 146.

Date/Time: 07/20/2006 02:31 PM
Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322; InfoPath.1)
QueryString: 
FieldList:
AFTER
BEFORE 


Can anyone help?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/farcry-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to