[coldbox-3.5.2] sessionmanagement require?

G’day
I’m gonna have to be a bit vague on this one, sorry, cos I don’t have my code in front of me. But maybe it’s an easy-answer without needing to see much detail.

I was setting up a new Coldbox-driven app yesterday, and I specifically did not enable session management because the app doesn’t need sessions.

When I tried to get Coldbox up and running, I started getting the usual CF error one gets if one doesn’t have sessions enabled but one tries to use a session variable.

I could not find a setting to pass to Coldbox to say “I’m not needing sessions thanks”, although just the Application.cfc setting ought to have been enough of an indication there, I’d’ve thought?

Does Coldbox require sessions to be enabled? Or am I just missing a setting somewhere?

Cheers.

Hi Adam,

Please check your config/coldbox.cfc for
// flash scope configuration
flash = {
scope = “session,client,cluster,ColdboxCache,or full path”,
properties = {}, // constructor properties for the flash scope implementation
inflateToRC = true, // automatically inflate flash data into the RC scope
inflateToPRC = false, // automatically inflate flash data into the PRC scope
autoPurge = true, // automatically purge flash data for you
autoSave = true // automatically save flash scopes at end of a request and on relocations.
};

the flash scope may be using session, configure it with Application scope then you don’t need session scope enabled.

also i18n can be configured with Application scope

//i18n & Localization
i18n = {
defaultResourceBundle = “includes/i18n/main”,
defaultLocale = “en_US”,
localeStorage = “session”,
unknownTranslation = “NOT FOUND
};

Thanks
Sana

Hi Sana, cheers for that. My config/Coldbox.cfc is simply thus:

The details of all the files I’m using can be found here (amongst all the narrative).

Adam,

As Brad and Sana have indicated, the default for Flash is the session scope. So in the config.cfc you will need to add the required information to change that.

Hi Sana
Yeah, that was it. Cheers for the tip.

Note this didn’t work:

scope = “ColdboxCache”

It just yields this error:

However this did work:
scope = “coldbox.system.web.flash.ColdboxCacheFlash”

Is that to be expected?

And, pleasingly, I didn’t seem to need all those other struct keys (which I had a guess at being optional?). Is that recommended though? I really don’t like having settings I don’t actually need, if poss.