Ticket #432 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

Ajax error messages don't appear in IE / other browsers

Reported by: VexedPanda Owned by: somebody
Priority: important Milestone: 1.0.3 Legacy Maintenance
Component: QForms Version: 1.0.2 Legacy Maintenance
Keywords: Cc:

Description

Taken from  http://qcu.be/content/error-prompt-ok-firefox-nothing-appen-ie-6-or-ie7

This is a patch to make ajax errors appear in more browsers.

Attachments

ticket432.patch Download (0.9 KB) - added by VexedPanda 5 years ago.
This is the code from the forum, and looks great to me. Be sure to check this into 1.0 and 1.1
ticket432v2.patch Download (1.7 KB) - added by VexedPanda 5 years ago.
Here we go. Much more confident in this one. Does a simple check of the HTTP status. Exceptions/etc will cause it to be 500. Really, != 200 may also be acceptable.
ticket432v3.patch Download (1.7 KB) - added by VexedPanda 5 years ago.
New patch. Checks for status >= 400, which are all error codes according to  http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Change History

Changed 5 years ago by VexedPanda

This is the code from the forum, and looks great to me. Be sure to check this into 1.0 and 1.1

Changed 5 years ago by VexedPanda

  • status changed from new to in_QA

Changed 5 years ago by alex94040

  • status changed from in_QA to closed
  • resolution set to fixed

(In [771]) Fixes #432 (Ajax error messages don't appear in IE / other browsers). Code by grossini. Review, testing, modifications by VexedPanda?. This is for the 1.1 branch.

Changed 5 years ago by alex94040

(In [772]) Fixes #432 (Ajax error messages don't appear in IE / other browsers). Code by grossini. Review, testing, modifications by VexedPanda?. This is for the 1.0 branch.

Changed 5 years ago by VexedPanda

  • status changed from closed to new
  • resolution fixed deleted

This patch breaks ajax actions that are simple redirects, such as the cancel button on the form drafts. We need a new approach. I'll try and debug the differences between an error and a sucess in other browsers some more.

Changed 5 years ago by VexedPanda

I'm rolling this back for now, since redirects are more important than error messages.

Changed 5 years ago by VexedPanda

[783] rolls this back.

Changed 5 years ago by VexedPanda

Here we go. Much more confident in this one. Does a simple check of the HTTP status. Exceptions/etc will cause it to be 500. Really, != 200 may also be acceptable.

Changed 5 years ago by alex94040

I wouldn't do a check for 200; I'd do a "anything greater than 400" - because 301's are also valid responses, and because 404 is also an invalid response.

Changed 5 years ago by VexedPanda

Sounds good to me. :)

Changed 5 years ago by alex94040

  • status changed from new to in_QA

Changed 5 years ago by VexedPanda

New patch. Checks for status >= 400, which are all error codes according to  http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Changed 4 years ago by VexedPanda

Can I get a review / commit of this?

Changed 4 years ago by alex94040

Looks good! Please commit. This should probably go into 1.0 and 1.1 branches, right?

Changed 4 years ago by VexedPanda

  • status changed from in_QA to closed
  • resolution set to fixed

(In [837]) Fixes #432 - commit for both branches

Note: See TracTickets for help on using tickets.