When I install a module through the UI and I press the "previous page" button in my browser. I get a huge ajax error spitting source code to me.
http://awesomescreenshot.com/04258yve3
Is there a way to supress this error? Or will this be a case of "Don't press tha damn button".
sidenote: I pressed the button because I was curious about the error message I got while installing a module with overlay on #1006832: Ajax error in UI module installer when we are in the overlay
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | core-batch-operation-error-1009716-11-d7.patch | 1.02 KB | suchdavid |
| #7 | 1009716-fix-batch-error-messages_rerolled.patch | 975 bytes | sphism |
| #2 | 1009716-fix-batch-error-messages.patch | 1.24 KB | bfroehle |
| #2 | Batch Good Error Message.jpg | 40.64 KB | bfroehle |
| #2 | Batch Bad Error Message.jpg | 172.68 KB | bfroehle |
Comments
Comment #1
Bence commentedI can confirm this error message.
Comment #2
bfroehle commentedSteps to reproduce: Do any batch operation, like going to admin/reports/updates/check. Wait for it to finish, hit the back button in your browser. Boom!
The issue stems from the generic use of
in _batch_page().
What we should be doing in this function is checking if op=do (which indicates an AJAX request) and returning an AJAX error message in that situation.
This leads to much prettier error messages as shown in the file attachments.
I did a cursory search for duplicates but didn't find any. Apologies if somebody else has already figured this out.
Patch attached.
Comment #3
bfroehle commentedRetitling -- there's not way to "fix" the error -- but what we can do is display a human readable error message "No active batch" rather than some html gobbeldygook.
Comment #4
bfroehle commentedAdding a usability tag, since that's what this issue is about.
Comment #5
bfroehle commentedComment #6
sphism commentedThis patch no longer applies since all core files are now in /core
I'll try to reroll the patch and post it back here
Comment #7
sphism commentedHmm... I think this patch is rerolled but now i'm getting a 500 error in drupal and have to go out... I'll check this later on... here's the patch anyway
Comment #8
sphism commentedOk I just tried to replicate this issue and apply that patch... The issue doesn't appear to be there any more and I've a funny feeling this commit fixed this issue:
#229825-89: backport "$_COOKIE['has_js'] must die" patch to 7.x
Which would mean this issue can be closed, and this patch discarded as unnecessary.
Comment #9
yesct commentedComment #10
yonailoHello,
This issue still exists in D7, and I can confirm that the proposed backport patch of #229825 (backport "$_COOKIE['has_js'] must die" patch to 7.x) does not solve this issue.
The patch "1009716-fix-batch-error-messages_rerolled.patch" applies cleanly to D7 (patch -p2) and it solves this issue. This should be scheduled for backporting IMHO.
Comment #11
suchdavid commentedHi
I think the previous patch doesn't work because it has wrong path for batch.inc. Otherwise the solution works. At least shows nicer error message. I corrected the patch for D7.