Setup an environment where the base Drupal URL looks like a normal domain that starts with "www". For example, you can add this to your hosts file "127.0.0.1 www.mycomputer.com", and then access the site as http://www.mycomputer.com.

Install the Linkification add-on: https://addons.mozilla.org/en-US/firefox/addon/190/. I tried this on Mac Firefox 3.6. I'm not sure if other systems are affected.

Add an article, browse for an image to upload, click "Upload".

You get an error with a giant alert that starts with "An AJAX HTTP request terminated abnormally." and continues with displaying the returned JSON string.

What's happening is that the Linkification add-on is converting occurrences of "www.mycomputer.com" within the JSON string into links, and that messes up the ability of the jQuery Form plugin used by the AJAX system to parse the JSON string.

It appears to only happen when IFRAME upload is used. See #995854-74: #ajax doesn't work at all if a file element (or enctype => "multipart/form-data") is included in the form for more details on when IFRAME upload is used.

IMO, this is a bug with the LInkification add-on, because we are returning a text/plain header, and it shouldn't act on plain text. Note, this bug existed before we added the text/plain header in #995854: #ajax doesn't work at all if a file element (or enctype => "multipart/form-data") is included in the form as well.

But, there are 1.5M downloads of this add-on, so we need to deal with this.

Here's a really hacky "fix" that works. Please provide better ideas if you have them.

Comments

effulgentsia’s picture

By the way, this issue isn't new. It's existed in the AJAX framework for a while apparently. See http://drupal.org/node/344693.

rfay’s picture

subscribe

effulgentsia’s picture

Assigned: Unassigned » effulgentsia
Status: Needs review » Needs work

I have another idea I'm gonna try, and post when it's ready.

effulgentsia’s picture

Title: Firefox Linkification add-on causes AJAX errors » Several popular browser extensions corrupt AJAX responses, causing errors
Assigned: effulgentsia » Unassigned
Status: Needs work » Needs review
StatusFileSize
new7.5 KB

Here's a much better solution. And it cleans up something that was bugging me in #995854-88: #ajax doesn't work at all if a file element (or enctype => "multipart/form-data") is included in the form which was our aggressive assumption that (not XHR = iframe), which doesn't take into account non-browser clients, and I really would like to see more Flash apps, iPhone apps, etc. use Drupal as a back-end.

I tested that this fixes the problem with Linkification. In http://drupal.org/node/344693, other reported browser extension conflicts were Currency Converter, SmarterFox, Browser Highlighter (from Skype), and SmoothScroll (for Chrome). I have not tested these, but I expect this to be a successful fix, since it would be very aggressive for an extension to modify the value of a textarea. After all, that's data that can be submitted to a form, so an extension that does that must receive tons of complaints.

effulgentsia’s picture

Priority: Normal » Major

Escalating to major, because users with these extensions currently are unable to upload files to a Drupal website.

Status: Needs review » Needs work

The last submitted patch, drupal.ajax_linkification.patch, failed testing.

effulgentsia’s picture

Status: Needs work » Needs review

#4: drupal.ajax_linkification.patch queued for re-testing.

effulgentsia’s picture

Status: Needs review » Closed (duplicate)

Uploaded the same patch to fix a different issue: #1018714-4: Image Upload Widget Not Working in IE8. If that issue gets fixed in some other way that doesn't also fix this one, I'll re-open this one.