I was charged with making some modification to an old application, and I created a new page which was being passed a URL parameter page_name
, which is a you guessed it a name of a page with .cfm
appended. So, in my haste, I continued using it, and was building out my CFC and using the page_name
as the identifier for a record. Then I realized that there is a possibility of that name being duplicated in the table, and changed that url parameter to use the page_id
, which is unique. I modified my CFC to use the new key, and nothing worked. So I started going through my code and figured I made a typo, started commenting things out, and finally dumped out my CFC object and voila, none of the edits I made were actually being used. This was fairly obvious, since page_name
was a string, and page_id
was numeric.
So I started googling,The first thing I saw as adjust things in the CFAdmin. I don't have access to it, and restarting the server isn't an option since I'm using an RDS to live code. The next thing I tried was to add applicationStop()
, onApplicationStart()
, to my Application.cfc
. Well the problem is that the Application.cfc, is actually an Application.cfm. So after fiddling with the <cfapplication ... >
tag, and nothing being updated, I'm here asking for help.
So is there a quick fix for this? Should I go ahead and create an application.cfc? I hope I explained myself, and sorry for all the text.
Confirm that your cfc is bound to either the session or application scope.
If it is, then you can rename the application in application.cfm and it will reset the object.
If your cfc is NOT bound to session or application scope, you have a cacheing issue. You need to go the the CF admin -> Server Settings -> Cache tab and uncheck component cache
and possibly some others.
For further recommendations, ColdFusion Components Inheriting Functions Of Others