As alluded to in the thread at
http://groups.google.com/group/coldbox/browse_thread/thread/aea2bed7cb9209b2/146d4cd4e22e5566
there is a serious problem with the SES interceptor and
event.buildLink() when using the config setting
'ConfigAutoReload=true'.
I spent many hours today trying to figure out why event.buildLink()
wasn't working correctly before I discovered this thread.
event.buildLink() wasn't using my sesBaseURL when creating links. I
wanted to confirm that I too had experienced this issue, but couldn't
reply to the original thread because Google Groups turns off replies
on older threads.
Basically this is what I've been able to deduce:
event.buildLink() uses the property 'instance.sesBaseURL' of
RequestContext.cfc when building links. This property is set when the
RequestContext object is initialized. Inside RequestContext.init() it
checks to see if SESBaseURL is defined in the app's config settings
and if so copies the value into instance.sesBaseURL. Now normally the
SES interceptor sets this config setting before the RequestContext
object is initialized. But if ConfigAutoReload=true then the
RequestContext object is initialized before the SES interceptor sets
the SESBaseURL setting. So the RequestContext's instance.sesBaseURL
defaults to an empty string and causes event.buildLink() to create
potentially incorrect links.
Fortunately, the workaround is easy once you know the cause---just
disable ConfigAutoReload. But it's not immediately obvious that this
setting is the cause. It would be nice if this issue could be
resolved. At the very least, this issue should be noted in the
documentation.