views:

403

answers:

1

Hello everybody,

I've now a Problem with the newest Version of KohanaPHP (kohanaphp.com).

After I've registered me and logged in into my test page, some minutes later, there is now the error:

ErrorException [ Notice ]: Undefined index: id

MODPATH/orm/classes/kohana/orm.php [ 1316 ]
1311   *
1312   * @return  mixed  primary key
1313   */
1314  public function pk()
1315  {
1316   return $this->_object[$this->_primary_key];
1317  }
1318 
1319  /**
1320   * Returns whether or not primary key is empty
1321   *

I've searched a lot in Google, but i never found an answer, the Problem now is, that I cant reloggin to get a new instance, because I've to call Auth::instance()->login() again, and Auth::instance() is not callable.

Whats todo now, how can I fix it, is there already a new Version of ORM or Auth Module?

Thanks everybody Ahmet

+1  A: 

That error occurs after a fatal error ( anywhere ), but I think it happens only in older versions of Kohana3. Delete your cookies after this occurs.

Try downloading the latest version of Kohana 3 again

EDIT:

You can get more info on this bug here

Kemo
I'm using kohana-3.0.4.2 and have downloaded it today. But in the Forum there is no solution, I've already readed it.Thank you.
ahmet2106
As I said, you'll get the cookie corrupted only if you get a fatal error previously ( doesn't matter if it happens through AJAX ).
Kemo
yes, there was an error, because in my template I've used $user(), which is the error, but now I've deleted it from my Template Content. What can I do to reset the Session? Because like this i cant login since 3 Hours -
ahmet2106
If im using session_delete() there is an error, if I'm using Session::instance()->destroy(), the same error, and login like Auth::instance()->login(...) is not working too, because my Session is broken. How can i renew this?
ahmet2106
you can always clear your domain cookies :) I use firefox's web developer toolbar, it's got a easy shortcut for doing it ( or Firecookie for Firebug ). This bug anyways should appear only in the development phase, the final product should never have fatal errors anyways.
Kemo
ah right - sorry forgotten the cookie :D +1
ahmet2106