From ca3d5c3bf7bba0a695bdb07e786da87392063c88 Mon Sep 17 00:00:00 2001 From: Jeroen van den Nieuwenhuisen Date: Fri, 24 Jul 2020 10:22:36 +0200 Subject: [PATCH] Add correct accept header to ajaxSubmit to prevent 406 error --- .../views/CRUD/Association/edit_many_script.html.twig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Resources/views/CRUD/Association/edit_many_script.html.twig b/src/Resources/views/CRUD/Association/edit_many_script.html.twig index b6d354dd37..c6c709c169 100644 --- a/src/Resources/views/CRUD/Association/edit_many_script.html.twig +++ b/src/Resources/views/CRUD/Association/edit_many_script.html.twig @@ -279,6 +279,9 @@ This code manages the many-to-[one|many] association field popup jQuery(form).ajaxSubmit({ url: url, type: type, + headers: { + Accept: 'application/json' + }, data: data, success: function(data) { Admin.log('[{{ id }}|field_dialog_form_action] ajax success');