Problem/Motivation
If a user navigates away from a page while an AJAX request is running they will get an error message saying "An AJAX HTTP request terminated abnormally"
Proposed resolution
Skip displaying the message if the user deliberately aborted (for example, by reloading the page or navigating to a different page) while the Ajax request was still ongoing. See, for example, the discussion at http://stackoverflow.com/questions/699941/handle-ajax-error-when-a-user-...
Splitted out the patch by David_Rothstein (that was already reviewed and marked RTBC by @Fabianx) from #1232416: Drupal alerts "An AJAX HTTP request terminated abnormally" during normal site operation, confusing site visitors/editors
Added by @droplet:
I understand this patch provided by David_Rothstein only. But we all in #1232416: Drupal alerts "An AJAX HTTP request terminated abnormally" during normal site operation, confusing site visitors/editors spent a hard time on it with the different thoughtful idea & patches.
git commit -m 'Issue #1232416 by hanoii, nod_, heddn, geerlingguy, lokapujya, David_Rothstein, mangy.fox, xurizaemon, timfernihough, jibran, effulgentsia, j0rd, joelpittet, temkin, slashrsm, maxi Todorov, leewillis77, droplet, showrx, orbiteleven, opdavies, rooby, yechuah, shabana.navas, nikunjkotecha, ehj-52n, jhedstrom, sah62, edutrul, rfay, seutje, drupalshrek: Drupal alerts "An AJAX HTTP request terminated abnormally" during normal site operation, confusing site visitors/editors'
Remaining tasks
Commit
User interface changes
N/A
API changes
N/A
Data model changes
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| 1232416-341.patch | 2.07 KB | stefan.r |
Comments
Comment #5
stefan.r commentedComment #6
droplet commentedComment #7
geerlingguy commentedAnother +1; this patch solves the 80% (probably more) use case—I'm guessing almost all the users in #1232416: Drupal alerts "An AJAX HTTP request terminated abnormally" during normal site operation, confusing site visitors/editors will have their main (annoying) problem resolved.
Comment #8
heddn+1
Comment #9
joelpittetThis is RTBC already but RTBC++ to keep it that way. Reviewed the patch and that looks like a great way to deal with those alerts with manual intervention.
Comment #10
manuel garcia commented+1 this is a huge improvement!
Do we need this link to stackoverflow?
Comment #11
stefan.r commentedComment #12
stefan.r commentedCommitted and pushed to 7.x, thanks!
Comment #14
David_Rothstein commented