danmurphy
01/30/2023, 6:39 PMcontroller.getColdBoxSettings();
it reports all of the settings as default (with the customErrorTemplate
being empty. It even says the environment is production, but still doesn’t match my settings as they are set in /config/Coldbox.cfc
in production or local (or anywhere). But dumping controller.getConfigSettings()
shows my settings as they are set in my local method.
Because of this, any error just gets reported with hardly any info because of there not being a customErrorTemplate
defined (even though it is in my actual settings). Also, for example, I have to reinit after every change locally because the default settings have handlerCaching set to true.
Has anyone seen this before? Not sure what to troubleshoot here.danmurphy
01/30/2023, 6:47 PMdanmurphy
01/30/2023, 6:47 PMdanmurphy
01/30/2023, 6:48 PMdanmurphy
01/30/2023, 6:50 PMbdw429s
01/30/2023, 8:02 PMdanmurphy
01/30/2023, 8:06 PMbdw429s
01/30/2023, 8:08 PMbdw429s
01/30/2023, 8:08 PMdanmurphy
01/30/2023, 8:08 PMdanmurphy
01/31/2023, 5:38 PMdevelopment
, you are forced into production mode and will get the BugReport-Public.cfm regardless of any config you have in Coldbox.cfc.
// Get exception information and mark the safe environment token
local.e = oException.getExceptionStruct();
stackFrames = arrayLen( local.e.TagContext );
local.safeEnvironment = "development";
// Is this an Ajax Request? If so, present the plain exception templates
local.requestHeaders = getHTTPRequestData( false ).headers;
if(
structKeyExists( local.requestHeaders, "X-Requested-With" )
&&
local.requestHeaders[ "X-Requested-With" ] eq "XMLHttpRequest"
){
// Development report
if( local.eventDetails.environment eq local.safeEnvironment ){
include "BugReport.cfm";
}
// Production Report
else {
include "BugReport-Public.cfm";
}
return;
}
danmurphy
01/31/2023, 5:41 PMdanmurphy
02/07/2023, 10:16 PMdanmurphy
02/07/2023, 10:16 PM