Thanks to all the folks that added the icons to message/warning/error boxes: #874370: System messages need identifying icons (WCAG 2.0)
I have found a small bug that turned up once the icons were added. When an AJAX error occurs on a /batch page (and probably elsewhere).
Recreate:
* Create a new simpletest (anywhere)
* Inside the test function, call a function that doesn't exist
* An ajax error will return that contains the error that occurred inside the simpletest (the fact that it does it this way is probably an issue of it's own)
* Your progress bar should be replaced with the error message itself
My error message looks like this:
![]()
The problem occurs because these errors don't contain the messages class. This has been the case for a while (I think), but wasn't really a concern until the icons were added and were allowed to... be a little overeager. :)
I'll see if I can work up a patch for this, but I'm not extremely familiar with the AJAX code, so I'm not sure how it'll go.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | ajax-icon-error-corrected.png | 43.28 KB | Anonymous (not verified) |
| #5 | 906922-ajax-batch-error-icon-1.patch | 657 bytes | Anonymous (not verified) |
| #3 | 906922-ajax-batch-error-icon.patch | 603 bytes | Anonymous (not verified) |
| ajax-icon-error.png | 62.43 KB | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) commentedAlso, the error message reads:
An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /batch?id=6&op=do StatusText: OK ResponseText: Fatal error: Call to undefined method CommerceSandboxTestCase::debug() in /Users/auzigog/Development/drupalcommerce/tests/commerce_base.test on line 422Comment #2
mgiffordAlerting this of this error. Where is this used other than simpletest?
Comment #3
Anonymous (not verified) commentedPatch was really simple. Just needed to modify one line inside batch.js.
See attached.
Comment #4
Anonymous (not verified) commented@mgifford - Batch is used on Drupal install, simpletests, and when you manually check for updates on admin/reports/updates. Possibly other places as well.
Also, here's what the corrected output should look like:
Also, my patch seems to add to the "p" class instead of the "div" class (as it should). I'll see if I can track down the appropriate place to add the
messagesclass to the div.Comment #5
Anonymous (not verified) commentedHere is a grep of all instances of class="error":
Turns out the patch needs to change misc/progress.js
New patch attached.
Comment #6
bleen commentedpersonally I think the screenshot in the original post looks pretty good, but if you want to be a stickler about it ... RTBC
Comment #7
mgifford@bleen18 - That was pretty funny.
@auzigog - The patch applies nicely, thanks for nailing this!
Comment #8
dries commentedCommitted to CVS HEAD.
Comment #9
sunWelcome to the Drupal core development team, auzigog! :) Nice patch.
Comment #10
Anonymous (not verified) commented@sun - Thanks. It's fun here. :)