Strange Included Application.cfc Problem
This is complicated to explain, so I hope this makes sense. Here goes...
I have an Application.cfc in the root of my site that sets some variables. I then have an Application.cfc in each subdirectory (Let's call each of these subdirectories a site) that includes the root Applicaiton.cfc. I also have an includes folder that's in the root directory that I use in each site for different pages that I pull in using the cfinclude tag that reference variables set in the root Application.cfc and the site Application.cfc. For some reason, if I hit the page in the includes directory directly everything seems to work okay. I can then go off to the different site pages that use cfinclude to pull in the files in the includes directory, and that works okay too. However, if we come back the next day and don't go directly to the page in the includes directory first and just go to one of the pages that pulls in the include files, we get an error saying that the variables in the root Application.cfc can't be found. I'm not sure where to start to try to debug this one???
This is the entire code from the root Application.cfc minus other variables:
<cfcomponent output="false">
<!--- Application name, should be unique --->
<cfset this.name = "openenrollment">
<!--- Run before the request is processed --->
<cffunction name="onRequestStart" returnType="boolean" output="false">
<cfargument name="thePage" type="string" required="true">
<cfset APPLICATION.memberDisease=True>
<cfreturn true>
</cffunction>
</cfcomponent>
This is the entire code from one of the site Application.cfc files minus other variables:
<cfcomponent output="false" extends="oe.Application">
<!--- Run before the request is processed --->
<cffunction name="onRequestStart" returnType="boolean" output="false">
<cfargument name="thePage" type="string" required="true">
<cfset APPLICATION.group="demo">
<cfreturn true>
</cffunction>
</cfcomponent>
The root of this site is actually a subdirectory named oe that's located in the root of the big site, so the root Application.cfc file lives in the /oe directory. The includes are in the /oe/includes directory, and In the example above the Application.cfc file is in the /oe/demo directory.
I'm new to this cfc stuff, so any help is GREATLY appreciated.
Thanks!
Holli