COLDBOX 4.1.0- API only running when "fwreinit" is passed

I just upgraded my API to coldbox 4.1.0 from 3.8.1 and everything seems to be running fine except for the fact that for whatever reason it only runs the API when "fwreinit" is passed in the URL, otherwise it just displays "bad request". I don't even know where to start to look to figure out why this is happening, any sort of help would be appreciated.

-Colin

Can you send a screenshot or a link to a URL where I can see this? Where is the error coming from?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

All that it is returning on the page is "bad request" no other data or logged info, I think I found the code that's erroring I'm just not entirely sure why.

if(application.firstinit || (application.maintflag && !structKeyExists(url,"fwreinit"))){
  Lock scope="application" type="exclusive" timeout="2"{
   Application.firstInit = false;
}
Getpagecontext().getResponse.setStatus(400, "application currently initalizing");

Abort;

}

If(!application.maintflag || (application.maintflag && structkeyexists(url,"fwreinit"))){
   Reloadchecks();

   If(structKeyExists(url,"fwreinit")){ ormReload();}
   If(findNoCase('index.cfm',listlast(arguments.targetPage,'/'))){ processColdboxRequest();}

}

If I remove the these if statements and just use the content within the api runs perfectly.

Sorry if this looks terrible as I have had to type it all out on my phone.

-Colin

That doesn’t appear to be code that’s part of the ColdBox framework at all. In fact, I think there’s a chance you may have been using a modified version of the 3.x framework. Run a diff on your old ColdBox framework to a fresh copy of the exact same version from our integration server where we keep old versions. Here’s 3.8.1:

http://integration.stg.ortussolutions.com/artifacts/ortussolutions/coldbox/3.8.1/

Start by seeing if the core had been modified in the past. That may explain what’s going on.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Thanks for the help, I just ripped out the code that was causing issues and built some new checks that handle the same basic logic and it works!