Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
A key failure in AJAX operations (including batch api) is that error reporting to the screen corrupts the AJAX response. I *think* a simple answer is to disable error reporting in ajax_deliver(). However, that would mean people would not get any feedback except by looking in the dblog. But I suspect we have to do it.
Comment | File | Size | Author |
---|---|---|---|
#2 | rfay_mac_airbook_screenshot 2012-01-30 at 7.44.46 PM.png | 50.12 KB | rfay |
Comments
Comment #1
effulgentsia CreditAttribution: effulgentsia commentedCan you provide a step-by-step example that demonstrates an AJAX response being corrupted by screen error reporting?
Comment #2
rfayHere's what a failure looks like. We've all seen a million of them. And of course they really have nothing to do with AJAX:
Essentially, all you need for for anything at all to go wrong in the batch, and you get something like this. An experienced person can read what it says and sort out the problem, but most people can't. And of course "An AJAX HTTP Error occurred is completely misleading.
This error was just caused by adding
in batch_example_op_1() of the batch_example in Examples project. Pretty much any error output during a batch operation causes things like this.
Comment #11
larowlanWe triaged this issue as part of a Bug Smash call - the question is does this belong in the Ajax system or in the Batch system
I've definitely still seen this error.
Comment #16
catchIs this a duplicate of #3049216: Uncaught Drupal.AjaxError with empty response text at this point?