Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeytown2’s picture

FileSize
2.6 KB

I see this comment, but maybe with all the changes to filefield this no longer applies?

  // For some reason, file uploads don't like drupal_json() with its manual
  // setting of the text/javascript HTTP header. So use this one instead.

Will test this patch and report back. I just got a page full of json when submitting a node, will be investigating.

quicksketch’s picture

Can you explain what the "bug" is here? FileField works fine with the current headers. As noted drupal_json() does not work reliably with FileField. It may have something to do with #752290: Reason for lots of users seeing "An error occurred at /admin/build/views/ajax/(field)/(view)/default/field/(name)", but I'm not really sure.

quicksketch’s picture

Status: Active » Closed (won't fix)

I don't think changing this would be wise, at least without a proper analysis of the repercussions. As far as I know the problems with drupal_json() were specifically related to Safari and jQuery Forms. As the jQuery Forms library certainly hasn't been updated in Drupal 6, I'd prefer not to make this change.

I did however commit the few code clean-up changes (removing whitespace) in your patch, and moved the 'devel_shutdown' disabling to the top of the function so that Devel won't botch up the error messages.