Status/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Bradley Wood / ()
Created: 08/17/2018
Components: Language
Versions: 2018
Failure Type: Incorrect w/Workaround
Found In Build/Fixed In Build: Final / 2018.0.0.311667
Priority/Frequency: Major / Some users will encounter
Locale/System: / Platforms All
Vote Count: 8
Problem Description:
ColdBox makes regular use of on the fly application specific mappings for modules that are registered. In 2018, there has been a regression in regards to these working.
Steps to Reproduce:
var appSettings = getApplicationMetadata();
appSettings.mappings[ '/foobar' ] = 'C:\windows\';
//getApplicationMetadata();
writeDump( expandPath( '/foobar' ) );
abort;
If you run the above code, the expandPath() will not correctly expand to C:/windows, but instead to the web root as though the mapping didn't exist. If you uncomment the extra call to getApplicationMetadata() then it will suddenly start working.
Actual Result:
Mapping is not used unless you call getApplicationMetadata() first.
Expected Result:
Mapping should be used immediately like it is on previous versions of ColdFusion.
Any Workarounds:
Manually call getApplicationMetadata() an extra time
Attachments:
Comments: