With older versions of coldbox, if my application’s configuration file was not in the conventional location I used to set it in Application.cfc as follows:
Since I upgraded to cb3.5.0, I get the following error:
# Could not find the ColdFusion Component or Interface /otherLocation/config/ColdBox.cfc. Ensure that the name is correct and that the component or interface exists. The error occurred in \vmware-host\shared folders\localDevelopment\coldbox\system\web\loader\CFCApplicationLoader.cfc: line 76
Called from \vmware-host\shared folders\localDevelopment\coldbox\system\web\services\LoaderService.cfc: line 51
Called from \vmware-host\shared folders\localDevelopment\coldbox\system\Coldbox.cfc: line 71
Called from \vmware-host\shared folders\localDevelopment\coldbox\system\Coldbox.cfc: line 102
Called from \vmware-host\shared folders\localDevelopment\status\Application.cfc: line 50 |
Looking at the code in CFCApplicationLoader, I noticed that the loadConfiguration function is no longer removing the file extension (line 43).
The code now looks like this:
//Create Config Structure var configStruct = structNew(); var coldboxSettings = instance.coldboxSettings; var appRootPath = instance.controller.getAppRootPath(); **var configCFCLocation = coldboxSettings["ConfigFileLocation"];**
While in previous versions was:
//Create Config Structure var configStruct = structNew(); var coldboxSettings = getColdboxSettings(); var appRootPath = getController().getAppRootPath(); **var configCFCLocation = getUtil().ripExtension(replacenocase(coldboxSettings["ConfigFileLocation"],appRootPath,""));**
I changed my setting to:
and apparently my application works fine now. Is this they way I should be doing my settings now? i.e. is this an intentional change in loadConfiguration?