> Right. And what's the specific error?
The specific error is that the following error message will
be outputted:
“The element of position 2, of dimension 2, of an array
object used as part of an expression, cannot be found.”
The array is in this case the struct.
> Have you trapped the error, done a <cfdump> of the
application scope and
> checked to see if it's the whole lot going awry, or just
some values?
I have not used cfdump for it, because the server had to be
immediately restarted for our customers. But i think, that it is
not completely empty, because the index runs to pos2 of
dimenstion2.
> However is there anywhere else this could could be being
included? I'm
> guessing "yes", otherwise you wouldn't have it in an
include file.
No, the code is only called from onApplicationStart().
Therefore I don´t believe in an race conditions problem.
But I have found another unclear question. The
application.cfc has a method onRequestStart() which proofes wheater
the user is logged in. If he isn´t, then another page will be
called. What happens in this case ? Will onApplicationStart() be
called before? Or only if onRequestStart() returns true?
Here is the code from onRequestStart()
<cffunction name="onRequestStart" returntype="boolean">
<cfargument name="Requestedpage" required="yes" />
<cfscript>
var lFile = "/cargorent/Login.cfm";
var iPosn = ListFindNoCase( lFile, Arguments.Requestedpage
);
if( iPosn gt 0 )
return true;
if( NOT IsDefined( "session.user.Loginname" ) or
session.user.Loginname eq "" )
{
WriteOutput( "<p><p> The current user is no
longer valid, please log in again.</p></p>" &
chr(10) & chr(13) );
WriteOutput( "<script
language=""javascript"">parent.location = ""
http://" & CGI.HTTP_HOST &
"/Login/Login.cfm"";</script>" );
return false;
}
return true;
</cfscript>
</cffunction>