You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cpg.root is instantiated before the web server is started so cpg.foo is not available in the root class.
I noticed this when I subclassed my root class from csauthenticate and made some stuff in my version of csauthenticate try to access cpg.configOption.sessionCookieName in it's init.
It seems that the structure of CP2 should be changed so that the root class is passed to cp when the server is started so it can be instantiated later on after things are set up around it.
If I understand this correctly, it can be solved by the application code itself. Simply call cpg.server.start before binding cpg.root. There's nothing in the core that relies on cpg.root being populated before the server starts. The only miniscule issue is that someone could request a page in the microsecond between the two calls, and be rejected.
Originally reported by: Anonymous
cpg.root is instantiated before the web server is started so cpg.foo is not available in the root class.
I noticed this when I subclassed my root class from csauthenticate and made some stuff in my version of csauthenticate try to access cpg.configOption.sessionCookieName in it's init.
It seems that the structure of CP2 should be changed so that the root class is passed to cp when the server is started so it can be instantiated later on after things are set up around it.
Reported by mischko chappie@mischko.com
The text was updated successfully, but these errors were encountered: