2 Replies Latest reply on Aug 10, 2014 6:12 PM by farDesi

    Problem with Application Scope

    Giambattista Scivoletto

      We use dynamic text on our websites.

       

      The dynamic text available in different languages is stored in structures in the Application scope.  Each resource bundle has its own variable to store its variables.  They can be called using the following format:

       

      #Application.StructName[Session.locale].Variable#

       

      The first part is the name of the structure variable. With brackets, the variable for the locale is passed in, specifying which part of the structure to use. The last part is the specific variable within the resource bundle to use.

       

      If we add new variables in the Application Scope will not be immediately seen. 

      The application scope can easily be refreshed by calling any page in the website and adding “refresh” as a variable in the URL. 

       

      This is the Application.cfc function to refresh the application scope:

       

      <cffunction name="onRequestStart">
      <cfargument name="requestname" required=true />    
              <!--- restart application scope --->
              <cfif structKeyExists(url,"refresh")>
              <cfset applicationStop()>  
              </cfif>           
      </cffunction>

       

      We have a problem on one of our site.

      When we call any page with 'refresh' url the site goes down, it says 'Locale is undefined in Session...', ONLY for one of our sites. It does not happen with other sites.


      That is driving us crazy.


      Is there some cold fusion specialist that can sense in which direction to move to try to resolve the problem?


      Thank you for your help.