The btest and ctest are both found in session.
- Shouldn’t ctest be GONE?
No, why would it be gone? It was set into the session scope and will live for the duration of the session. The fact that you set it in General.Index is irrelevant.
- Can you set session vars in onSessionStart?
Yes, that should not be a problem. You might want to check your coldbox config and ensure that your onSessionStart handler is mapped. Also, you may have put the code in after hitting the app for the first time which means it didn’t run. Restart CF and hit it again.
OnSessionStart is mapped in the Main.cfc but I now have REMOVED it since it does not work for me. I am not using onSessionStart inside of Application.cfc since it works there.
yes ctest should have been gone as I closed my browser completely and reopened the browser and the session was still live. I have fixed it with killing the session. I have not had to build a BRAND NEW app in so long I forgot about setting the cooke.id and cookie.token to the session.id and session.token Since cookies are turned off it creates a temporary cookie that dies.
It probablt doesnt work cause you dont have the coldbox event called in the onSession method in Application.cfc