RE: [coldbox:17493] [Coldbox 3.5.0] Strange Request Collection Mismapping

In your error handler, can you dump out the form scope and rc struct to help pinpoint the issue?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

What about your routes. Do you have any routes

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano

Yes. We use routes in a significant way. Our application needs to support multi-tenancy and we are attempting to support it by making the first position in the PATH_INFO be our tenant identifier (portalCode). We also want to distinguish between different entrypoints to our application. So a request from Salesforce would be labelled as such using the appropriate route and associated matched variables.

addModuleRoutes(pattern=“rest”,module=“rest”);

addRoute(pattern=“validateThis/:action?”,handler=“validateThis”);

//Public pages
addRoute(pattern=“www/:action?”,handler=“www”);

//Salesforce Pages
addRoute(pattern=":portalCode/sf/:handler?/:action?",matchVariables=“entrypoint=salesforce”);

// Your Application Routes
addRoute(pattern=":portalCode/:handler?/:action?",matchVariables=“entrypoint=web”);

Then, we have a portalInterceptor.cfc that ensures the portalCode is a reference to a valid portal, and resets the baseURL so that calls to event.buildLink() will include the portalCode in the URL path.

<cfelseif listlen(event.getSesBaseURL(),’/’) lte 2>
<cfset event.setSesBaseURL("#protocol#://#cgi.HTTP_HOST#/#listfirst(cgi.path_info,’/’)#")>

Similarly, we have a salesforceInterceptor.cfc that modifies the baseURL so that calls to event.buildLink() will include the ‘sf’ identifier.



<cfset event.setSesBaseURL("#protocol#://#cgi.HTTP_HOST#/#listfirst(cgi.path_info,’/’)#/sf")>

I’m sure there’s a cleaner way of doing this and I have a hunch that all of this baseURL manipulation might be part of the problem.

Thanks,
Tim.

I did some digging into the coldbox code and it looks as though the sesBaseURL is stored in the cbcontroller, which lives in the ColdFusion application scope. Ouch. If I had to guess, our solution to modify the sesBaseURL on each request is causing this issue. I think we need to find a different way to persist the portalCode and entrypoint in our calls to event.buildLink(). Any ideas?

I’m still unable to reproduce the error on demand, and yet it is still occurring on our production servers. Louis, you asked about routes. What might routes have to do with it? Where else might I look?

Thanks,
Tim.

just to verify you had some routing issue that removed the variables

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano