I can not update from 3.11 to 3.18, because I then get ajax errors, when I use the select box of an exposed filter with ajax callback. The Callback is updating the value of a second exposed filter depending on the value of the first one. With 3.11 everything worked fine.

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /system/ajax
StatusText: OK
ResponseText:

admin/reports/dblog:
Invalid Form POST Data
Notice: Undefined index: form_build_id in ajax_get_form() (Row 325 ... /includes/ajax.inc).

In hook_form_views_exposed_form_alter $form is containing form_build_id.
In includes/ajax.inc $_POST is missing form_build_id.

The error doesn't appear, if i remove the callback.
In the error case the callback function (ajax_callback_anw) is not called anymore.

function hook_form_views_exposed_form_alter(&$form, &$form_state, $form_id) {
...
        $form['field_anwendungsname_tid']['#ajax'] = array(
            'callback' => 'ajax_callback_anw',
            'event' => 'change',
        );

        $form['field_anwendungsname_tid']['#options'] = getoptions_anwendungsname($form_state);
...
}

function ajax_callback_anw($form, &$form_state) {
  object_log('callback_anw(',$form);
  return array(
    '#type' => 'ajax',
    '#commands' => array(
      ajax_command_replace("#artikelgruppe_wrapper", render($form['field_artikelgruppenname_tid'])),
      ajax_command_replace("#geb1_wrapper", render($form['field_geb1name_tid']))
    )
  );
}

Comments

mec_muc created an issue. See original summary.

mec_muc’s picture

Issue summary: View changes
mec_muc’s picture

Issue tags: +ajax callback
mec_muc’s picture

Issue summary: View changes
fra_ore_90’s picture

+1

boby_ui’s picture

+1

mec_muc’s picture

Title: AJAX HTTP error » AJAX HTTP error - Undefined index: form_build_id in ajax_get_form()
Version: 7.x-3.13 » 7.x-3.18
Issue summary: View changes
mec_muc’s picture

Issue summary: View changes
mec_muc’s picture

Issue summary: View changes
mec_muc’s picture

Title: AJAX HTTP error - Undefined index: form_build_id in ajax_get_form() » AJAX Callback error - Undefined index: form_build_id in ajax_get_form()
Issue summary: View changes
mec_muc’s picture

Issue summary: View changes
mec_muc’s picture

Issue summary: View changes
mec_muc’s picture

Issue summary: View changes
mec_muc’s picture

Component: Miscellaneous » exposed filters
mec_muc’s picture

Issue summary: View changes
mec_muc’s picture

Issue summary: View changes
mec_muc’s picture

Title: AJAX Callback error - Undefined index: form_build_id in ajax_get_form() » AJAX Callback error - Undefined index: form_build_id
mec_muc’s picture

Issue summary: View changes
mec_muc’s picture

Issue summary: View changes
DamienMcKenna’s picture

Issue tags: -select

Can you please identify which version (3.12, 3.13, 3.14, 3.15, 3.16, 3.17 or 3.18) breaks it? Thanks.

mec_muc’s picture

The last version 3.15-3.20 are all breaking it. 3.14 seemed to work.

It is working with 3.20 when I apply patch #129 from
https://www.drupal.org/project/views/issues/1183418
https://www.drupal.org/files/issues/views-n1183418-128.patch

Thanks