Apparently nobody has used profile.module with devel.module activated.

A simple grep shows me there is potentially one more of these errors as well:

modules/system/system.admin.inc:  echo drupal_to_js($result);

But I'm not sure. Anyway, this patch fixes the profile.module error.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Title: Profile autocomplete sending wrong header with json code » Replace improper use of drupal_to_js() with drupal_json()
FileSize
1.2 KB

Confirmed that using echo drupal_to_js($var) is not the intended use. This bug is still present in 7.x and is also should be fixed in system_date_time_lookup.

Dave Reid’s picture

Version: 6.x-dev » 7.x-dev
Assigned: Unassigned » Dave Reid

Setting this to 7.x and will need to backport to 6.x

Dries’s picture

Looks like upload.module might need to be updated too?

Dave Reid’s picture

No, it looks like there's a later comment explanation in upload_js, but the explanation is still kinda weird...

  // We send the updated file attachments form.
  // Don't call drupal_json(). ahah.js uses an iframe and
  // the header output by drupal_json() causes problems in some browsers.

Status: Needs review » Needs work

The last submitted patch failed testing.

Dave Reid’s picture

Status: Needs work » Needs review

Failed due to #74645: modify file_scan_directory to include a regex for the nomask.. Setting back to code needs review.

drewish’s picture

Status: Needs review » Reviewed & tested by the community

patch still applies and everything seems to work. ran through the install and the timezone was selected correctly (i'm assuming that's what that bit of js does). created a profile text field and tested that the auto complete suggested properly. i'm assuming that's all there is to test.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Pasqualle’s picture

Version: 7.x-dev » 6.x-dev
Status: Fixed » Patch (to be ported)
Dave Reid’s picture

Status: Patch (to be ported) » Needs review
FileSize
1.21 KB

Patch for 6.x ready for review.

c960657’s picture

Status: Needs review » Needs work

There are also two occurrences in upload.module.

merlinofchaos’s picture

Status: Needs work » Needs review

upload.module was covered in #3 and #4.

c960657’s picture

Status: Needs review » Reviewed & tested by the community

Oops, sorry about that. In that case I guess it's RTBC.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed to Drupal 6.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.