- Issue created by @orkut murat yılmaz
- 🇹🇷Turkey orkut murat yılmaz Istanbul
I've checked it after updating to Drupal 10.2.0 and the error is still there:
Uncaught Object { message: "\nAn AJAX HTTP error occurred.\nHTTP Result Code: 200\nDebugging information follows.\nPath: /en/admin/config/content/entity_browser/pixabay/widgets?ajax_form=1\nStatusText: parsererror\nResponseText: ", name: "AjaxError", stack: "@https://drupal.localhost/core/misc/ajax.js?v=10.2.0:196:32\n@https://drupal.localhost/core/misc/ajax.js?v=10.2.0:1915:3\n" } message: "\nAn AJAX HTTP error occurred.\nHTTP Result Code: 200\nDebugging information follows.\nPath: /en/admin/config/content/entity_browser/pixabay/widgets?ajax_form=1\nStatusText: parsererror\nResponseText: " name: "AjaxError" stack: "@https://drupal.localhost/core/misc/ajax.js?v=10.2.0:196:32\n@https://drupal.localhost/core/misc/ajax.js?v=10.2.0:1915:3\n" <prototype>: Error: columnNumber: 32 constructor: function AjaxError(xmlhttp, uri, customMessage) fileName: "https://drupal.localhost/core/misc/ajax.js?v=10.2.0" lineNumber: 196 stack: "@https://drupal.localhost/core/misc/ajax.js?v=10.2.0:196:32\n@https://drupal.localhost/core/misc/ajax.js?v=10.2.0:1915:3\n" <prototype>: Error.prototype { stack: "", … }
- 🇸🇮Slovenia bkomel
Hi! I was not able to reproduce the error in the console, by following your steps on either Drupal core versions 10.1.6 or 10.2.0. Do you have any debug turned on perhaps? Can you please paste any related report log errors (The Database logging module has to be enabled)?
- 🇹🇷Turkey orkut murat yılmaz Istanbul
@bkomel, sorry for not providing details about the error message.
I've just tried it on a local DDEV environment and I've faced the same error on the browser console. Then, I've typed "
ddev logs
" on my terminal. The last two lines of the output is:2024/01/08 21:08:00 [warn] 2150#2150: *449 an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp/1/00/0000000001 while reading upstream, client: 192.168.64.5, server: , request: "GET /sites/default/files/js/js_8iTNnVNQuE2Vb3THC5OgFDYqXNxyPxvWgoqP1A9F6WQ.js?scope=footer&delta=0&language=en&theme=gin&include=eJx9kVmShCAMhi-EcoY5iRUxaqaROAGssU_fccEpq6vngSX5vywEx32PaDvJM_ja7ZZxHBL-pgz-TyieylN4REUEbWCZwNNTIzwI28Fzq0RMq0KDGShYXQd7JgKXaME9SdEbcA5DusyRhZ5aD3yTmH0LckkU6OBiIvdYb5kdew9zxMNJ2q8EdX__ZJS17rXVGz6BGylgFWBCE7VmcjkVsdjmbMCWRnJEKdB2r0knE02HC-qstr0qaOK8xWX5f5wFh27SB57WfsZSdS9yBy4pif7XZ6keeUHZhhHeHlNjdDDj1xZsWhqamWa05fICd8fQjw HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: "drupalstarter.ddev.site", referrer: "https://drupalstarter.ddev.site/admin/config/content/entity_browser/add" 2024/01/08 21:08:24 [info] 2163#2163: *464 client closed connection while waiting for request, client: 192.168.64.5, server: 0.0.0.0:80 [08-Jan-2024 21:08:29] WARNING: [pool www] child 3545 said into stderr: "NOTICE: PHP message: Uncaught PHP Exception TypeError: "Drupal\media_pixabay\Plugin\EntityBrowser\Widget\Pixabay::__construct(): Argument #10 ($logger) must be of type Drupal\Core\Logger\LoggerChannelFactory, Drupal\redirect_404\Render\Redirect404LogSuppressor given, called in /var/www/html/web/modules/contrib/media_pixabay/src/Plugin/EntityBrowser/Widget/Pixabay.php on line 197" at /var/www/html/web/modules/contrib/media_pixabay/src/Plugin/EntityBrowser/Widget/Pixabay.php line 147" 2024/01/08 21:08:29 [error] 2161#2161: *466 FastCGI sent in stderr: "PHP message: Uncaught PHP Exception TypeError: "Drupal\media_pixabay\Plugin\EntityBrowser\Widget\Pixabay::__construct(): Argument #10 ($logger) must be of type Drupal\Core\Logger\LoggerChannelFactory, Drupal\redirect_404\Render\Redirect404LogSuppressor given, called in /var/www/html/web/modules/contrib/media_pixabay/src/Plugin/EntityBrowser/Widget/Pixabay.php on line 197" at /var/www/html/web/modules/contrib/media_pixabay/src/Plugin/EntityBrowser/Widget/Pixabay.php line 147" while reading response header from upstream, client: 192.168.64.5, server: , request: "POST /admin/config/content/entity_browser/pixabay/widgets?ajax_form=1&_wrapper_format=drupal_ajax HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: "drupalstarter.ddev.site", referrer: "https://drupalstarter.ddev.site/admin/config/content/entity_browser/pixabay/widgets"
- 🇸🇮Slovenia bkomel
Hi! Thank you for the details. You have the drupal/redirect module's submodule redirect_404 installed and enabled which decorates the logger.factory Drupal core service with the Redirect404LogSuppressor which implements the LoggerChannelFactoryInterface. The provided patch makes the Pixabay widget plugin accept all LoggerChannelFactoryInterface implementations for the $loggerFactory property.
- Status changed to Needs review
11 months ago 11:10am 9 January 2024 - Status changed to RTBC
11 months ago 9:32pm 10 January 2024 - 🇹🇷Turkey orkut murat yılmaz Istanbul
@bkomel, thanks for your patch. it works nice:)
can you create a merge request too?
- Merge request !8Pixabay Entity Browser widget plugin accepts all implementations of the... → (Merged) created by bkomel
- First commit to issue fork.
-
slogar32 →
committed dd4d0d77 on 3.0.x authored by
bkomel →
Issue #3405721 by bkomel, slogar32, Orkut Murat Yılmaz: AJAX Error When...
-
slogar32 →
committed dd4d0d77 on 3.0.x authored by
bkomel →
- Status changed to Fixed
9 months ago 10:47am 1 March 2024 Automatically closed - issue fixed for 2 weeks with no activity.