Skip to main content
Participant
June 15, 2010
Question

Application variables in site-wide error page

  • June 15, 2010
  • 1 reply
  • 371 views

We have just started using coldfusion 8 on redhat 5. I have a sitewide error page that uses Application scope variables. I get an error when trying to access the application scope variables. Any suggestions?

FYI,

we currently do not use an Application.cfc but we use the old Application.cfm (with an uppercase "A"). We will be changing that soon.

The offending code is:

<cfmodule name="#Application.controllerModDirectory#mwRegController"
            method="getSystemValue"
            code="PORTAL_ADMIN_EMAIL"
            rValue="adminEmail">

This code called independently works just fine but on redhat 5 it doesn't work. Feels like I am missing something fundamental.

TIA,

Steve

    This topic has been closed for replies.

    1 reply

    ilssac
    Inspiring
    June 15, 2010

    Is this code run in the context of the application name you want to tie it to.

    This depends on the location(s) of the Application.cfm files and|or <cfappliation...> tags relative to the various pieces of the code in your directory structure.  For a piece of CFML code to share an application scope with any other CFML code, it has to run in the same context defined by the application name.

    It is not unlikely that the file location of the site wide handler is not underneith the Applicaiton.cfm file that defines the application name.  If so it needs to be under the same Application.cfm or one of its own or otherwise run an <cfapplication....> tag that uses the same name string.

    Participant
    June 15, 2010

    The error page is in the same physical folder as the Application.cfm. It is in the same context

    Inspiring
    June 15, 2010

    What's the exact error, and what do you see if you replace your current site-wide error code with just a dump of the application scope?

    I just tested what you are describing on my CF9 install, and it all works fine for me.  Albeit on Windows.

    --

    Adam