only in patch2: unchanged: --- a/includes/context-access-admin.inc +++ b/includes/context-access-admin.inc @@ -318,7 +318,10 @@ function ctools_access_ajax_add($fragment = NULL, $name = NULL) { $output[] = ctools_modal_command_dismiss(); } - print ajax_render($output); + return array( + '#type' => 'ajax', + '#commands' => $output + ); } /** @@ -385,7 +388,10 @@ function ctools_access_ajax_edit($fragment = NULL, $id = NULL) { $output[] = ctools_modal_command_dismiss(); } - print ajax_render($output); + return array( + '#type' => 'ajax', + '#commands' => $output + ); } /** @@ -482,5 +488,6 @@ function ctools_access_ajax_delete($fragment = NULL, $id = NULL) { $output = array(); $output[] = ajax_command_replace('table#ctools-access-table', $table); + drupal_add_http_header('Content-type', 'application/json; charset=utf-8'); print ajax_render($output); } only in patch2: unchanged: --- a/includes/context-admin.inc +++ b/includes/context-admin.inc @@ -477,8 +477,11 @@ function ctools_context_ajax_item_add($mechanism = NULL, $type = NULL, $cache_ke else { $output = ctools_modal_form_render($form_state, $output); } - print ajax_render($output); - exit; + + return array( + '#type' => 'ajax', + '#commands' => $output + ); } /** @@ -610,8 +613,11 @@ function ctools_context_ajax_item_edit($mechanism = NULL, $type = NULL, $cache_k else { $output = ctools_modal_form_render($form_state, $output); } - print ajax_render($output); - exit; + + return array( + '#type' => 'ajax', + '#commands' => $output + ); } /** @@ -773,6 +779,8 @@ function ctools_context_ajax_item_delete($mechanism = NULL, $type = NULL, $cache $output = array(); $output[] = ajax_command_replace('#' . $type . '-row-' . $position, ''); $output[] = ajax_command_restripe("#$type-table"); + + drupal_add_http_header('Content-type', 'application/json; charset=utf-8'); print ajax_render($output); exit; } only in patch2: unchanged: --- a/includes/modal.inc +++ b/includes/modal.inc @@ -243,5 +243,8 @@ function ctools_modal_form_render($form_state, $output) { function ctools_modal_render($title, $output) { $commands = array(); $commands[] = ctools_modal_command_display($title, $output); - print ajax_render($commands); + return array( + '#type' => 'ajax', + '#commands' => $commands + ); }