Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedI see this comment, but maybe with all the changes to filefield this no longer applies?
Will test this patch and report back. I just got a page full of json when submitting a node, will be investigating.
Comment #2
quicksketchCan 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.
Comment #3
quicksketchI 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.