For debugging purposes, try pasting this first thing into your AppController::beforeFilter() :
$this->log("Here: {$this->here}, coming from: " . $this->referer(), LOG_DEBUG);
This will be logged in /app/tmp/logs/debug.log . You can also combine this with an override of the redirect method in the AppController :
function redirect($url, $status = null, $exit = true) { $trace = debug_backtrace(); $this->log("Redirecting to: " . Router::url($url) . ", initiated in {$trace[1]['file']} on line {$trace[1]['line']}", LOG_DEBUG); parent::redirect($url, $status, $exit); }
deceze
source share