General developer forum

Why does my login redirect to draftfile.php rather than Home?

 
 
Andrew Normore
Why does my login redirect to draftfile.php rather than Home?
 

I built a theme, after logging in, I get redirected here:.

http://moodle.dev/draftfile.php//user/draft/172363282/

 
Average of ratings: -
Picture of Itamar Tzadok
Re: Why does my login redirect to draftfile.php rather than Home?
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

Andy, surely not enough information to start understanding the problem. smile

 
Average of ratings: -
Picture of Kris Stokking
Re: Why does my login redirect to draftfile.php rather than Home?
 

Redirects happen because $CFG->wantsurl is set to something on login.  Usually that happens when you set a bookmark to something other than the login page for your site (in your case, a draft file).  If your session has expired, Moodle forwards you to the login page for authentication and then back to the original page you requested.  You will want to check your theme to see if it sets $CFG->wantsurl, but I would guess your problem is unrelated to it.

 
Average of ratings:Useful (1)