TwoD found a major bug in ajax_command_settings() as well as ajax_render().
1) ajax.js is trying to access the key "settings", but "argument" is sent via JSON.
2) ajax_render() doesn't merge the settings like http://api.drupal.org/api/function/drupal_get_js/7 does, so you get an unprocessed array of settings. ;)
Attached patch fixes that.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | drupal.ajax-settings.3.patch | 7.06 KB | sun |
| drupal.ajax-settings.patch | 1.22 KB | sun |
Comments
Comment #1
twodTested the patch and it works perfectly now.
Comment #2
webchickLet's add some tests for this.
Comment #3
sunReminder: YOU requested that. Yes, YOU! Good news: There are no AJAX framework tests at all yet. Have fun reviewing! *ggg*
Comment #4
sun.
katbailey just ran into the same bug while porting a module. Please commit.
Comment #5
webchickThanks for the ping. This fell off my radar.
Committed to HEAD.
Comment #6
twodGreat, thanks!