Hi I'm running ColdFusion 3 r3090 from SVN and have noticed that my
calls to event.buildLink( 'foo.bar' ) when I reinit the framework are
in the format:
http://localhost/mysite/index.cfm/foo/bar
however, when I don't call the reinit, then the link is:
/foo/bar
which doesn't work on my set up.
getSetting( 'htmlBaseURL' ) always returns http://localhost/mysite/
and getSetting('sesBaseURL') always returns http://localhost/mysite/index.cfm
(regardless of the whether the framework has been reinitialized)
My routes.cfm looks like this:
<cfscript>
// General Properties
setEnabled(true);
setUniqueURLS(false);
//setAutoReload(false);
// Base URL
if( len(getSetting('AppMapping') ) lte 1){
setBaseURL("http://#cgi.HTTP_HOST#/index.cfm");
}
else{
setBaseURL("http://#cgi.HTTP_HOST#/#getSetting('AppMapping')#/
index.cfm");
}
// Your Application Routes
addRoute(pattern=":handler/:action?");
</cfscript>
ColdBox.xml.cfm looks like
<Interceptors>
<!-- USE ENVIRONMENT CONTROL -->
<Interceptor class="coldbox.system.interceptors.EnvironmentControl">
<Property name='configFile'>config/environments.xml.cfm</Property>
</Interceptor>
<!-- USE AUTOWIRING -->
<Interceptor class="coldbox.system.interceptors.Autowire" />
<!-- USE SES -->
<Interceptor class="coldbox.system.interceptors.SES">
<Property name="configFile">config/Routes.cfm</Property>
</Interceptor>
<!-- @SIDEBAR@ -->
</Interceptors>
I don't have a ColdBox config written in script. I've also gone
through my code to make sure that I'm not calling setBaseURL() or
setSESBaseURL() anywhere else in the app.
After step debugging through the app I can see that the
RequestContext.init() method is being called twice in the request
cycle. The second time the SESBaseURL property is not passed in
arguments.properties.
Is there any reason why
coldbox.system.web.context.RequestContext.init() should be called
twice?
Thanks!