Looking through the logs, we're getting hundreds of the following
"Error","jrpp-185","08/21/12","10:05:43","PATH","www.domain.com
Agent:Mozilla/4.0 (compatible; Synapse)
Error: An exception occurred when invoking a event handler method from Application.cfc.
The method name is: onRequest.
They seem to be mostly search bots. The on place on APplication.cfc that I can see reference to the function is below
<cffunction name="onRequest" returnType="void">
<cfargument name="targetPage" type="String" required=true/>
<cfsetting enablecfoutputonly="yes" requesttimeout="20">
<cfparam name="url.refresh" default="0">
<cfset request.strMember = Duplicate(session.strMember)/>
<cfset request.tNow = GetTickCount()>
<cfif url.refresh EQ 0>
<cfset request.iCacheHr = 12/>
<cfelse>
<cfset request.iCacheHr = 0/>
</cfif>
<cflogin>
<cfif IsDefined("session.strMember.sRoles")>
<cfloginuser name="#session.strMember.sFirstName##session.strMember.sLastName#"
password="12345"
roles="#session.strMember.sRoles#"/>
</cfif>
</cflogin>
<cfinclude template="core/incl/SessionLogger.cfm">
<cfinclude template="core/incl/LinkTranslator.cfm">
<cfinclude template="core/incl/udf.cfm">
<cfinclude template="urlcheck.cfm"/>
<cfinclude template="#Arguments.targetPage#">
</cffunction>
From that, can anyone please advise on what's wrong and how to fix it? I'm fairly new to CF and this is making me pull out what little hair I have left
Element XMLHOMEPAGE is undefined in a CFML structure referenced as part of an expression.- pee2peeElement STRMEMBER is undefined in SESSION- pee2peeElement STRMEMBER is undefined in SESSION- is most likely causing your "Error: An exception occurred when invoking a event handler method from ..." Probably the best approach would be to set it to empty string by default. - Germann Arlington<cffunction name="onSessionStart"> <cfscript> session.strMember = StructNew(); session.strMember.iMemberId = 0; session.strMember.lSecurityLevels = "Guest"; </cfscript>...this is where/how its set - pee2peeElement XMLZONE is undefined in REQUEST.and the code is<cfscript> variables.aZoneInfo = XmlSearch(application.xmlZones, "//zone[position() = 1]"); try { request.xmlZone = ToString(variables.aZoneInfo[1]); } catch(any expt){ variables.objZoneDAO = CreateObject("component", "#application.sComponentDir#ZoneDAO").init(application.sDSN); variables.objZoneDAO.Read(variables.objZone, 1); } </cfscript>. This only tends to happen for the occasional bots. The XML file is there and works for all users. Any ideas? - pee2pee