I'm quite new to the coldbox platform but I recently wrote an
application for a friend. The site works fine on localhost development
but fails when I put it on hostmysite.com. The page renders and
submits after login but errors out immediately. I can see that the
culprit is the sessionstorage variables which are lost on each page
request (the onsessionstart is called each time). I don't know how to
resolve the issue though. I am using the latest coldbox stable
download from about a month ago, here is some of the settings I am
using.
Coldbox.cfc:
function configure(){
// coldbox directives
coldbox = {
//Application Setup
appName = "FHTApp",
appMapping = "XXX/coldbox/FHT",
eventName = "event",
//Development Settings
debugMode = false,
debugPassword = "",
reinitPassword = "XXX",
handlersIndexAutoReload = false,
configAutoReload = false,
//Implicit Events
defaultEvent = "login.dspLogin",
requestStartHandler = "main.onRequestStart",
requestEndHandler = "main.onRequestEnd",
applicationStartHandler = "main.onAppInit",
applicationEndHandler = "",
sessionStartHandler = "main.onSessionStart",
sessionEndHandler = "",
missingTemplateHandler = "",
//Extension Points
UDFLibraryFile = "includes/helpers/ApplicationHelper.cfm",
coldboxExtensionsLocation = "",
modulesExternalLocation = "",
pluginsExternalLocation = "XXX.coldbox.system.plugins",
viewsExternalLocation = "",
layoutsExternalLocation = "",
handlersExternalLocation = "",
requestContextDecorator = "",
//Error/Exception Handling
exceptionHandler = "",
onInvalidEvent = "",
customErrorTemplate = "",
//Application Aspects
handlerCaching = true,
eventCaching = true,
proxyReturnCollection = false,
flashURLPersistScope = "session"
};
//Conventions
conventions = {
handlersLocation = "handlers",
pluginsLocation = "plugins",
viewsLocation = "views",
layoutsLocation = "layouts",
modelsLocation = "model",
eventAction = "index"
};
application.cfc:
<cfset this.name = 'FHTApp'>
<cfset this.sessionManagement = true>
<cfset this.sessionTimeout = createTimeSpan(0,2,0,0)>
<cfset this.setClientCookies = true>
XXX = sitepath of the hosted file.
I have been in contact with hostmysite.com and they say that this is
now a problem outside their scope. I'm assuming that the issue is with
a setting in coldbox but can't figure it out after a lot of head
scratching and google searches. I have stopped and dumped information
at each point and the session variable gets lost after the page
submit. Any help or guidance in resolving this issue would be greatly
appreciated. I can provide any other information/code if needed.