4 Replies Latest reply on Apr 5, 2013 1:56 PM by MPRyan1173

    Application.cfc stopped rendering


      CF10  Local Dev MAC machine. Built in server.

      Nothing has changed in my Application.cfc.


      Cleared cache via admin pages,

      Changed Application.cfc/Application.cfm lookup order to all three settings.

      Restarted Server and computer several times.

      Changed Name of Application.cfc to 1Application.cfc and back.


      My pages are not seeing THIS.Datasource and if just try to output This.Name on blank page I get "Element NAME is undefined in THIS".



      I'm having the same issue as this post. But the fix isn't working for me.

      coldfusion application.cfc not found


      Not sure what/how do trouble shoot further.

        • 1. Re: Application.cfc stopped rendering
          Aegis Kleais Level 3

          Are you outputting the THIS.name from one of the Built-in Function's methods or are you outputting it from another page?


          THIS scope is referencable from the component, so if a page is trying to call it.


          In the onApplicationStart(), do:


          <cfset APPLICATION.datasource = THIS.datasource />


          And then on the page that is referencing the variable, have it use APPLICATION.datasource instead.

          • 2. Re: Application.cfc stopped rendering
            MPRyan1173 Level 1

            I'm trying to call This.Name from a .cfm page.


            I added the <cfset APPLICATION.datasource = THIS.datasource /> and no luck.  I even tried


            <cfset APPLICATION.datasource = "MyDatabase" /> in OnApplicationStart.


            Restarted Server


            When I tried to output APPLICATION.datasource and still get similar results



            APPLICATION.datasource is undefinded.

            • 3. Re: Application.cfc stopped rendering
              Aegis Kleais Level 3

              Have you given your application a name?


              <cfset THIS.name = 'testapp' />


              If your application successfully started and you change some code in the onApplicationStart(), it will not execute unless manually called or having restarted the application.

              • 4. Re: Application.cfc stopped rendering
                MPRyan1173 Level 1

                Yes Applicatoin has a name. 


                I have restated server multiple times. 


                I also have this on RequestStart which isn't fireing as well.


                <cfif structKeyExists(URL, "Restart")>


                <cfset OnApplicationStart()>
                <cfset OnSessionStart()>
                <cfcache action="flush"
                Site refreshed
                Aborting your request now...