Matt, I believe that officially CF would always search relative to the current directory first, which applies to CFC's and custom tags. In which case if you instantiate the cfc from within subdir, were you also have a com/mycfc.cfc then this one would be found first.
I have generally found that ColdFusion search order is not always reliable (at least on a shared server with many sites), it sometimes does as above, but sometimes looks in the webroot first, and if you have custom tag paths it may look there first as well, so I have always used a mapping to avoid this problem. So perhaps the original developer used a mapping if this code used to work fine before? On Sun, Mar 13, 2011 at 9:51 PM, Matt Quackenbush <[email protected]>wrote: > > Ever since CFCs were introduced, the path to them has been derived based > upon the web root. So, given the following directory structure... > > /webroot > /com > - myCFC.cfc > /subdir > /com > - myCFC.cfc > > ... if I were to do the following... > > myCFCInstance = createObject("component","com.myCFC"); > > ... no matter what file in the directory structure I did this in, I would > always be creating an instance of /webroot/com/myCFC.cfc. I would **NOT** > be creating an instance of /webroot/subdir/com/myCFC.cfc unless I provided > that full path. E.g. > > myCFCInstance = createObject("component","subdir.com.myCFC"); > > I am attempting to get a project setup locally (not coded by me) that has a > directory structure similar to the above. I am running CF 9.0.1, which is > giving me an instance of the subdirectory's CFC, rather than the one right > off the web root. I thought I remembered seeing a thread about this issue > quite some time back, but I cannot find it anywhere. > > Has anyone ever experienced this and/or know a solution? (Other than > loading up CF8... lol.) > > Thanks in advance. > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342970 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

