- Issue created by @jifernandezs
- πͺπΈSpain jifernandezs
I have identified an issue in the core, but my knowledge in AJAX is limited to creating an effective patch. If I comment out line 336 of the file /web/core/misc/ajax.js, where Drupal.ajax(elementSettings); is called, the error does not occur. Do you know if someone can help me, please? Thank you in advance.
- Status changed to Postponed: needs info
12 months ago 2:28pm 5 January 2024 This looks possibly the same as previous-reported π Uncaught ajax.js error / exception Active . Can you confirm?
- πͺπΈSpain jifernandezs
I have tried to apply all three patches, but I am unable to do so. Additionally, I have observed that batch processes also generate a similar error in the log:
2024/01/05 16:19:08 [warn] 2044#2044: *126 upstream sent more data than specified in "Content-Length" header while reading upstream, client: 20.201.7.5, server: , request: "POST /batch?id=9964&op=do_nojs&op=do&_format=json HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: "chg.ddev.site", referrer: "https://chg.ddev.site/batch?id=9964&op=start"
And when I attempt to upload a file, I encounter an issue. However, this is not related to the core, but it may be associated. The error message is as follows:
Oops, something went wrong. Check your browser's developer console for more details.
Uncaught Object { message: '\nThere was an HTTP AJAX error.\nHTTP Result Code: 200\nBelow is the debugging information.\nPath: /admin/config/chg/upload-puntos-de-control?element_parents=file_accdb&ajax_form=1\nStatusText: parsererror\nResponseText: [{"command":"settings","settings":{"ajaxPageState":{"theme":"seven","theme_token":"Vb6TVw9WTDMv89tmhBqFxeAPAoznJOmnKRfgrY9TozU","libraries":"eJx9kQ1uwyAMhS_E4Aw7SeRQh9DyNxuypacfNKFrIy0Skh_vs42R4eJtGHKMbgRSe5SZEAX8i-QcFyQbMob8njYwAulZbeHAWuRnI6tjECPoW_XrSepFD6fwymK0Zkg2oepC1IKMP7mAUxcqCZz8cz6cDTc-T9nHqkmEHYPOdsFH9ea3L1Oo5PpVkFY5RfIbCVWBs3cUk3XPBk2LqT4C38jRo3rRkhdzxiTP1gvGBYPSDpjXrd2b45EZDPLuGhfH-hfOa53ZCJ4jZV1yH6ffxWGpx7tE1pDws22vstJAIVEYqbdq-rFC_gWglOJN"},"ajax":{"edit-file-accdb-remove-button--4uUZnfM_1Vo":{"callback":["Drupal\\\\file\\\\Element\\\\ManagedFile","uploadAjaxCallback"],"wrapper":"ajax-wrapper--iAkOvhz1t0w","effect":"none","progress":{"type":"throbber","message":null},"event":"mousedown","keypress":true,"prevent":"click","url":"\\/admin\\/config\\/chg\\/upload-puntos-de-control?element_parents=file_accdb\\u0026ajax_form=1\\u0026_wrapper_format=drupal_ajax","httpMethod":"POST","dialogType":"ajax","submit":{"_triggering_element_name":"file_accdb_remove_button","_triggering_element_value":"Eliminar"}}},"ajaxTrustedUrl":{"\\/admin\\/config\\/chg\\/upload-puntos-de-control?element_parents=file_accdb\\u0026ajax_form=1\\u0026_wrapper_format=drupal_ajax":true},"pluralDelimiter":"\\u0003","user":{"uid":"1","permissionsHash":"efb4e575ff6688acee77ae2f12e85ea1d5a33e6e2725f100b2959892db6a2068"}},"merge":true},{"command":"update_build_id","old":"form-lWvacYiVWv7oTffEeQIN733fQfqTznYnQGjtV1tUV78","new":"form-BhbE-sUhg1Fl4y1eLX6JqVtkqC-xQsF6INkYiRbA4fI"},{"command":"insert","method":"replaceWith","selector":null,"data":"\\u003Cdiv id=\\u0022ajax-wrapper--iAkOvhz1t0w\\u0022\\u003E\\u003Cdiv class=\\u0022js-form-item form-item js-form-type-managed-file form-type-managed-file js-form-item-file-accdb form-item-file-accdb form-no-label\\u0022\\u003E\\n \\n\\u003Cdiv id=\\u0022edit-file-accdb--1ro2tq03iSk\\u0022 class=\\u0022js-form-managed-file form-managed-file\\u0022\\u003E\\n \\u003Cinput data-drupal-selector=\\u0022edit-file-accdb-fids\\u0022 type=\\u0022hidden\\u0022 name=\\u0022file_accdb[fids]\\u0022 value=\\u002220357\\u0022 \\/\\u003E\\n\\n\\u003Cspan data-drupal-selector=\\u0022edit-file-accdb-file-20357-filename\\u0022 class=\\u0022file file--mime-application-octet-stream file--general\\u0022\\u003E \\u003Ca href=\\u0022\\/system\\/files\\/files\\/1704471827\\/20230915_ResultadosFQ_SPF_incremental.accdb\\u0022 type=\\u0022application\\/octet-stream\\u0022 title=\\u002220230915_ResultadosFQ_SPF_incremental.accdb\\u0022\\u003E20230915_ResultadosFQ_SPF_incremental.accdb\\u003C\\/a\\u003E\\u003C\\/span\\u003E\\n\\u003Cinput data-drupal-selector=\\u0022edit-file-accdb-remove-button\\u0022 formnovalidate=\\u0022formnovalidate\\u0022 type=\\u0022submit\\u0022 id=\\u0022edit-file-accdb-remove-button--4uUZnfM_1Vo\\u0022 name=\\u0022file_accdb_remove_button\\u0022 value=\\u0022Eliminar\\u0022 class=\\u0022button js-form-submit form-submit\\u0022 \\/\\u003E\\n\\n\\u003C\\/div\\u003E\\n\\u003C\\/div\\u003E","settings":null' name: "AjaxError", stack: "@https://chg.ddev.site/core/misc/ajax.js?v=10.2.1:196:32\n@https://chg.ddev.site/core/misc/ajax.js?v=10.2.1:1915:3\n" } β message: '\nThere was an HTTP AJAX error.\nHTTP Result Code: 200\nBelow is the debugging information.\nPath: /admin/config/chg/upload-puntos-de-control?element_parents=file_accdb&ajax_form=1\nStatusText: parsererror\nResponseText: [{"command":"settings","settings":{"ajaxPageState":{"theme":"seven","theme_token":"Vb6TVw9WTDMv89tmhBqFxeAPAoznJOmnKRfgrY9TozU","libraries":"eJx9kQ1uwyAMhS_E4Aw7SeRQh9DyNxuypacfNKFrIy0Skh_vs42R4eJtGHKMbgRSe5SZEAX8i-QcFyQbMob8njYwAulZbeHAWuRnI6tjECPoW_XrSepFD6fwymK0Zkg2oepC1IKMP7mAUxcqCZz8cz6cDTc-T9nHqkmEHYPOdsFH9ea3L1Oo5PpVkFY5RfIbCVWBs3cUk3XPBk2LqT4C38jRo3rRkhdzxiTP1gvGBYPSDpjXrd2b45EZDPLuGhfH-hfOa53ZCJ4jZV1yH6ffxWGpx7tE1pDws22vstJAIVEYqbdq-rFC_gWglOJN"},"ajax":{"edit-file-accdb-remove-button--4uUZnfM_1Vo":{"callback":["Drupal\\\\file\\\\Element\\\\ManagedFile","uploadAjaxCallback"],"wrapper":"ajax-wrapper--iAkOvhz1t0w","effect":"none","progress":{"type":"throbber","message":null},"event":"mousedown","keypress":true,"prevent":"click","url":"\\/admin\\/config\\/chg\\/upload-puntos-de-control?element_parents=file_accdb\\u0026ajax_form=1\\u0026_wrapper_format=drupal_ajax","httpMethod":"POST","dialogType":"ajax","submit":{"_triggering_element_name":"file_accdb_remove_button","_triggering_element_value":"Eliminar"}}},"ajaxTrustedUrl":{"\\/admin\\/config\\/chg\\/upload-puntos-de-control?element_parents=file_accdb\\u0026ajax_form=1\\u0026_wrapper_format=drupal_ajax":true},"pluralDelimiter":"\\u0003","user":{"uid":"1","permissionsHash":"efb4e575ff6688acee77ae2f12e85ea1d5a33e6e2725f100b2959892db6a2068"}},"merge":true},{"command":"update_build_id","old":"form-lWvacYiVWv7oTffEeQIN733fQfqTznYnQGjtV1tUV78","new":"form-BhbE-sUhg1Fl4y1eLX6JqVtkqC-xQsF6INkYiRbA4fI"},{"command":"insert","method":"replaceWith","selector":null,"data":"\\u003Cdiv id=\\u0022ajax-wrapper--iAkOvhz1t0w\\u0022\\u003E\\u003Cdiv class=\\u0022js-form-item form-item js-form-type-managed-file form-type-managed-file js-form-item-file-accdb form-item-file-accdb form-no-label\\u0022\\u003E\\n \\n\\u003Cdiv id=\\u0022edit-file-accdb--1ro2tq03iSk\\u0022 class=\\u0022js-form-managed-file form-managed-file\\u0022\\u003E\\n \\u003Cinput data-drupal-selector=\\u0022edit-file-accdb-fids\\u0022 type=\\u0022hidden\\u0022 name=\\u0022file_accdb[fids]\\u0022 value=\\u002220357\\u0022 \\/\\u003E\\n\\n\\u003Cspan data-drupal-selector=\\u0022edit-file-accdb-file-20357-filename\\u0022 class=\\u0022file file--mime-application-octet-stream file--general\\u0022\\u003E \\u003Ca href=\\u0022\\/system\\/files\\/files\\/1704471827\\/20230915_ResultadosFQ_SPF_incremental.accdb\\u0022 type=\\u0022application\\/octet-stream\\u0022 title=\\u002220230915_ResultadosFQ_SPF_incremental.accdb\\u0022\\u003E20230915_ResultadosFQ_SPF_incremental.accdb\\u003C\\/a\\u003E\\u003C\\/span\\u003E\\n\\u003Cinput data-drupal-selector=\\u0022edit-file-accdb-remove-button\\u0022 formnovalidate=\\u0022formnovalidate\\u0022 type=\\u0022submit\\u0022 id=\\u0022edit-file-accdb-remove-button--4uUZnfM_1Vo\\u0022 name=\\u0022file_accdb_remove_button\\u0022 value=\\u0022Eliminar\\u0022 class=\\u0022button js-form-submit form-submit\\u0022 \\/\\u003E\\n\\n\\u003C\\/div\\u003E\\n\\u003C\\/div\\u003E","settings":null' β name: "AjaxError" β stack: "@https://chg.ddev.site/core/misc/ajax.js?v=10.2.1:196:32\n@https://chg.ddev.site/core/misc/ajax.js?v=10.2.1:1915:3\n" β : Error: ajax.js:196:32
Then, in the console, I see:
2024/01/05 16:23:47 [warn] 2047#2047: *176 upstream sent more data than specified in "Content-Length" header while reading upstream, client: 20.201.7.5, server: , request: "POST /admin/config/chg/upload-puntos-de-control?element_parents=file_accdb&ajax_form=1&_wrapper_format=drupal_ajax HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: "chg.ddev.site", referrer: "https://chg.ddev.site/admin/config/chg/upload-puntos-de-control"
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Can you update to 10.2.1 and report back?
- πͺπΈSpain jifernandezs
Yes, it's already updated, and it's still the same. Additionally, in case it helps, I have:
- KUbuntu 22.04.3 LTS
- ddev version v1.22.6
There are like three different errors being reported in this one issue.
- πͺπΈSpain jifernandezs
Apologies, this issue will be for the first error you reported. I initially thought subsequent issues were related, but I'll separate them into multiple issues.