tracker issue : CF-4203283

select a category, or use search below
(searches all categories and all time range)
Title:

On the fly app specific mappings not registering correctly

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Bradley Wood / ()

Created: 08/17/2018

Components: Language

Versions: 13.0

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: 7

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:

ColdBox continues to be completely broken out of the box on 2018 due to this bug. I see the fix didn't make it into updater 1. Is there hope for updater 2?
Comment by Bradley Wood
29700 | September 14, 2018 03:55:28 AM GMT
This is a blocker for anyone using the ColdBox framework who wishes to upgrade to 2018.
Comment by Jonathan Clausen
29752 | October 02, 2018 09:05:21 PM GMT
This indicates a complete lack of testing against real world CF applications!
29775 | October 09, 2018 08:48:27 PM GMT