Closed GoogleCodeExporter closed 9 years ago
My login form does this:
Vosao.jsonrpc.loginFrontService.login(function (r, e) {
if (Vosao.serviceFailed(e)) return;
if (r.result == 'success') {
$('#login-messages').html('<span style="color:green">Success. Logging in...</span>');
document.location.href = r.message;
}
I don't know what it used to be for a SiteUser but currently LoginServiceImpl
returns a value '/cms/'.
Maybe that hasn't changed, what's changed is what happens after that.
I'm getting an error:
stack TypeError: Cannot call method 'getLoggedIn' of undefined
at http://172.20.104.73:8888/cms/main.min.js:11:353022
at JSONRpcClient.readyCB (http://172.20.104.73:8888/cms/main.min.js:11:239401)
at Object.cb (http://172.20.104.73:8888/cms/main.min.js:11:1743)
at http://172.20.104.73:8888/cms/main.min.js:11:231151
arguments getLoggedIn,
type non_object_property_call
message Cannot call method 'getLoggedIn' of undefined
name TypeError
Ok, so what I'm missing is these two lines in my script:
Vosao.app.loggedIn = true;
Vosao.app.trigger('login');
the problem in my case is that Vosao.app is not defined.
So, ok, there's no problem if I go to /cms/ when I'm not logged in, the login
works.
It's when I use a form embedded in the main page that that doesn't work.
Perhaps I'm missing some initialization. I know a dependency on backbone was
added....
Original comment by theb...@emanueleziglioli.it
on 11 Feb 2012 at 12:50
The same problem was solved by replacing the document.location.href =
r.message; on
document.location.href = 'any URL';
Original comment by SlynkoNi...@gmail.com
on 12 Feb 2012 at 8:21
yep, that's what I did at the end :-) thx
Original comment by theb...@emanueleziglioli.it
on 12 Feb 2012 at 8:40
Original comment by kinyelo@gmail.com
on 12 Feb 2012 at 8:51
This issue was closed by revision r1150.
Original comment by kinyelo@gmail.com
on 12 Feb 2012 at 8:52
Original issue reported on code.google.com by
theb...@emanueleziglioli.it
on 10 Feb 2012 at 1:37