Hi,
Nice module.
I've tested this with the latest versions of Anynchronous, Page Renderer and Chrysalis theme.
To replicate on a fresh Drupal install: from the front page, as anonymous user, click on a link that goes to a restricted area of the website (eg. 'administration section').
Asynchronous should display the access denied page, instead it leaves the current page intact and only updates the url (so when you hit refresh you will actually get to the desired, denied, section).
Cheers
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | async_display_access_denied_1.patch | 874 bytes | andreiashu |
| #1 | async_display_access_denied.patch | 791 bytes | andreiashu |
Comments
Comment #1
andreiashu commentedAnd here is the patch :)
Comment #2
andreiashu commentedComment #3
recidive commentedHello andreiashu,
I'm glad you like the module.
Your patch looks good. Just a few questions:
Is this the best way to parse json in jquery?
Maybe we should add a simple alert() saying some error ocurred for now?
Thank you.
Comment #4
andreiashu commentedHi recidive,
this
was taken (and adapted) from jQuery's source code (version 1.3.2 line 3724):
So this is the same as doing
$.ajaxrequest of type json.That being said, a little bit of more research I found out this: http://www.json.org/js.html:
Even that json.org says that eval is not safe, in our case it is "safe" enough. If someone gets to inject JS on the server side then we have bigger problems anyway.
I think that maybe having the "Loading..." message at the top of the page saying something like "We're sorry, an error occured. Please try to refresh your page" might be better :)
Cheers
Comment #5
recidive commentedHello,
"Even that json.org says that eval is not safe, in our case it is "safe" enough. If someone gets to inject JS on the server side then we have bigger problems anyway."
Fair enough :)
"I think that maybe having the "Loading..." message at the top of the page saying something like "We're sorry, an error occured. Please try to refresh your page" might be better :)"
Sure, anything now will do the trick, in the long run we may want to provide some functions to modify the "Loading..." message.
Can I assume you're working on the patch? Looking forward to commit it ;)
Comment #6
andreiashu commentedYes,
I'll resubmit this night or tomorrow another patch :)
cheers
Comment #7
andreiashu commentedHere it is.
Cheers
Comment #8
recidive commentedCommited a slight modified version of the patch.
Added an alert for now, as the error was being added to the bottom of the page. Added some notes that we need a better error reporting tool.
Thank you very much!