Discovered the source of my problem. The Auth component detects whether it's an AJAX request or not. If the session has timed out, it'll try to load an element which is set by $ajaxLogin in Auth. If that isn't set, it just doesn't seem to know what to do and just crashes out.
On Jun 23, 10:00 am, James K <[EMAIL PROTECTED]> wrote: > Has anyone else come into this problem? I'm using Cake's Auth > component and the Request Handler to do my login system. Logging in is > done via a standard non-AJAX Cake generated form using the Form > Helper. The user is authenticated and then forwarded to the > application which makes heavy use of AJAX requests. If the user's > session times out, any successive AJAX calls will result in a 500 > error (according to FireBug), and will give the user no feedback (the > loading bar will just sit there forever). > > I suspect it has some issue with cake trying to forward the AJAX > request to the login page (which is a regular page with a non-AJAX > layout). I'd like to handle the situation more gracefully like > forwarding to a page which will spawn a login box, or at the VERY > least throw a "sorry, your session has timed out" message. Is there > any way to catch a session timeout from an AJAX request and handle it > separately via the Auth component? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
