<p>I'm trying to log in to the admin area of an local install but all that happens is the page refreshes and nothing happens. Digging deeper I found this in the log:</p>

<pre><code>2016/03/09 09:16:38 [error] [exception.CException] exception
'CException' with message 'Property "Craft\SessionRecord.token" is not defined.'
in /craft/app/framework/base/CComponent.php:173
</code></pre>

<p>I've tried re-downloading the app folder from Craft (which updated the install to the latest version fine) and I've also disabled all plugins but the issue persists.</p>

<p>Has anyone else come across this error and know how to solve it? Thank you!</p>

<p>Stack trace:</p>

<pre><code>2016/03/09 17:29:36 [error] [exception.CException] exception    'CException' with message 'Property "Craft\SessionRecord.token" is not  defined.' in /path/to/craft/app/framework/base/CComponent.php:173
Stack trace:
#0 /path/to/craft/app/framework/db/ar/CActiveRecord.php(162): CComponent-&gt;__set('token', 'ea2be7c4a632df0...')
#1 /path/to/craft/app/services/UserSessionService.php(728): CActiveRecord-&gt;__set('token', 'ea2be7c4a632df0...')
#2 /path/to/craft/app/services/UserSessionService.php(626): Craft\UserSessionService-&gt;storeSessionToken(Object(Craft\UserModel), 'ea2be7c4a632df0...')
#3 /path/to/craft/app/services/UserSessionService.php(549): Craft\UserSessionService-&gt;loginByUserId('1', false, true)
#4 /path/to/craft/app/controllers/UsersController.php(66): Craft\UserSessionService-&gt;login('impalondon', 'NewPassword', false)
#5 /path/to/craft/app/framework/web/actions/CInlineAction.php(49): Craft\UsersController-&gt;actionLogin()
#6 /path/to/craft/app/framework/web/CController.php(308): CInlineAction-&gt;runWithParams(Array)
#7 /path/to/craft/app/framework/web/CController.php(286): CController-&gt;runAction(Object(CInlineAction))
#8 /path/to/craft/app/framework/web/CController.php(265): CController-&gt;runActionWithFilters(Object(CInlineAction), Array)
#9 /path/to/craft/app/framework/web/CWebApplication.php(282): CController-&gt;run('login')
#10 /path/to/craft/app/etc/web/WebApp.php(815): CWebApplication-&gt;runController('users/login')
#11 /path/to/craft/app/etc/web/WebApp.php(285): Craft\WebApp-  &gt;_processActionRequest()
#12 /path/to/craft/app/framework/base/CApplication.php(184): Craft\WebApp-&gt;processRequest()
#13 /path/to/craft/app/index.php(62): CApplication-&gt;run()
#14 /path/to/index.php(14): require_once('/Users/alecrits...')
#15 {main}
REQUEST_URI=/index.php/admin/actions/users/login
HTTP_REFERER=http://impalondon.dev/admin/login
</code></pre>

<p><a href="https://i.sstatic.net/28kCL.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/28kCL.jpg" alt="enter image description here"></a></p>

CC BY-SA 3.0
2016-03-09T17:09:09.020Z
If you enable devMode is there any plugin involved further down in the stack trace maybe?
Brad Bell
CC BY-SA 3.0
2016-03-09T17:09:35.403Z
Actually sharing the full stack trace would be useful, too.
Brad Bell
CC BY-SA 3.0
2016-03-09T17:33:54.027Z
@BradBell , sure thing added stack trace
Alec Ritson
CC BY-SA 3.0
2016-03-09T17:42:26.507Z
If you open `craft/app/records/SessionRecord` and find the `defineAttributes` method, is `token` one of the attributes?
Brad Bell
CC BY-SA 3.0
2016-03-09T17:43:19.763Z
Yes, I got this: `'token' => array(AttributeType::String, 'maxLength' => 100, 'column' => ColumnType::Char, 'required' => true),`
Alec Ritson
CC BY-SA 3.0
2016-03-09T17:44:29.733Z
Well... wtf.  Does the `craft_session` table in the database have a `token` column?
Brad Bell
CC BY-SA 3.0
2016-03-09T17:52:23.510Z
Yeah it does i've added a screenshot from Sequel Pro, never come across this issue before...
Alec Ritson
CC BY-SA 3.0
2016-03-09T17:57:20.677Z
Hrm... I'm out of ideas. I was going to say if it's on a public site and you don't mind sharing credentials, hit us up at support@craftcms.com, but it looks like its local.  Definitely first time I've seen that behavior.
Brad Bell
CC BY-SA 3.0
2016-03-09T18:01:22.337Z
Maybe send a database backup to support and will see if we can reproduce it with just that. Probably worth sending your `config/general.php` file along as well.
Brad Bell
CC BY-SA 3.0
2016-03-09T18:03:18.810Z
Yeah no worries, thanks for your input. I'll try get it onto a staging server to test again and if it's still the same issue I'll throw you guys an email with some credentials :)
Alec Ritson
CC BY-SA 3.0
2016-03-09T18:21:08.560Z
Put it to staging, Craft performed a little update for some reason but now I can log in fine. Not sure what happened or why but the issue is resolved. Thanks for your help!
Alec Ritson
CC BY-SA 3.0
2016-03-09T18:24:52.503Z
Hah... yay?  Maybe add that as a (not-so-satisfying) official answer I suppose.
Brad Bell
CC BY-SA 3.0
2016-03-09T20:05:17.750Z
@AlecRitson, have you encountered any shimmering insights that'd allow you to answer this question, or should I just disappear it? I'm glad you've been able to move on, I'm just not sure there's much value left here for future visitors.
Matt Stein
CC BY-SA 3.0
2016-03-09T20:07:56.783Z
Hey @MattStein I haven't had a chance yet, It's all on git so I'm gonna fetch the latest (from the little update craft did) and then compare to see what's gone on and what's changed to see if it gives a clue and then update this with any answer, so if you could hold fire for a little while that would be grand :)
Alec Ritson
CC BY-SA 3.0
2016-03-09T20:09:25.800Z
Good luck then, @AlecRitson, and thanks for your diligence!
Matt Stein
<admin><error><login><session>
Property "Craft\SessionRecord.token" is not defined
# Property "Craft\SessionRecord.token" is not defined

(Asked by: username_0 on 2016-03-09)

I'm trying to log in to the admin area of an local install but all that happens is the page refreshes and nothing happens. Digging deeper I found this in the log:
2016/03/09 09:16:38 [error] [exception.CException] exception
'CException' with message 'Property "Craft\SessionRecord.token" is not defined.'
in /craft/app/framework/base/CComponent.php:173

I've tried re-downloading the app folder from Craft (which updated the install to the latest version fine) and I've also disabled all plugins but the issue persists.
Has anyone else come across this error and know how to solve it? Thank you!
Stack trace:
2016/03/09 17:29:36 [error] [exception.CException] exception    'CException' with message 'Property "Craft\SessionRecord.token" is not  defined.' in /path/to/craft/app/framework/base/CComponent.php:173
Stack trace:
#0 /path/to/craft/app/framework/db/ar/CActiveRecord.php(162): CComponent->__set('token', 'ea2be7c4a632df0...')
#1 /path/to/craft/app/services/UserSessionService.php(728): CActiveRecord->__set('token', 'ea2be7c4a632df0...')
#2 /path/to/craft/app/services/UserSessionService.php(626): Craft\UserSessionService->storeSessionToken(Object(Craft\UserModel), 'ea2be7c4a632df0...')
#3 /path/to/craft/app/services/UserSessionService.php(549): Craft\UserSessionService->loginByUserId('1', false, true)
#4 /path/to/craft/app/controllers/UsersController.php(66): Craft\UserSessionService->login('impalondon', 'NewPassword', false)
#5 /path/to/craft/app/framework/web/actions/CInlineAction.php(49): Craft\UsersController->actionLogin()
#6 /path/to/craft/app/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
#7 /path/to/craft/app/framework/web/CController.php(286): CController->runAction(Object(CInlineAction))
#8 /path/to/craft/app/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#9 /path/to/craft/app/framework/web/CWebApplication.php(282): CController->run('login')
#10 /path/to/craft/app/etc/web/WebApp.php(815): CWebApplication->runController('users/login')
#11 /path/to/craft/app/etc/web/WebApp.php(285): Craft\WebApp-  >_processActionRequest()
#12 /path/to/craft/app/framework/base/CApplication.php(184): Craft\WebApp->processRequest()
#13 /path/to/craft/app/index.php(62): CApplication->run()
#14 /path/to/index.php(14): require_once('/Users/alecrits...')
#15 {main}
REQUEST_URI=/index.php/admin/actions/users/login
HTTP_REFERER=http://impalondon.dev/admin/login

**Tags:** admin, error, login, session

> **Comments:**
> **username_1**: If you enable devMode is there any plugin involved further down in the stack trace maybe?  
> **username_1**: Actually sharing the full stack trace would be useful, too.  
> **username_0**: @BradBell , sure thing added stack trace  
> **username_1**: If you open `craft/app/records/SessionRecord` and find the `defineAttributes` method, is `token` one of the attributes?  
> **username_0**: Yes, I got this: `'token' => array(AttributeType::String, 'maxLength' => 100, 'column' => ColumnType::Char, 'required' => true),`  
> **username_1**: Well... wtf.  Does the `craft_session` table in the database have a `token` column?  
> **username_0**: Yeah it does i've added a screenshot from Sequel Pro, never come across this issue before...  
> **username_1**: Hrm... I'm out of ideas. I was going to say if it's on a public site and you don't mind sharing credentials, hit us up at support@craftcms.com, but it looks like its local.  Definitely first time I've seen that behavior.  
> **username_1**: Maybe send a database backup to support and will see if we can reproduce it with just that. Probably worth sending your `config/general.php` file along as well.  
> **username_0**: Yeah no worries, thanks for your input. I'll try get it onto a staging server to test again and if it's still the same issue I'll throw you guys an email with some credentials :)  
> **username_0**: Put it to staging, Craft performed a little update for some reason but now I can log in fine. Not sure what happened or why but the issue is resolved. Thanks for your help!  
> **username_1**: Hah... yay?  Maybe add that as a (not-so-satisfying) official answer I suppose.  
> **username_2**: @AlecRitson, have you encountered any shimmering insights that'd allow you to answer this question, or should I just disappear it? I'm glad you've been able to move on, I'm just not sure there's much value left here for future visitors.  
> **username_0**: Hey @MattStein I haven't had a chance yet, It's all on git so I'm gonna fetch the latest (from the little update craft did) and then compare to see what's gone on and what's changed to see if it gives a clue and then update this with any answer, so if you could hold fire for a little while that would be grand :)  
> **username_2**: Good luck then, @AlecRitson, and thanks for your diligence!  

---

## 0 answers

