Drupal 9.3.7.running on PHP 8.1. Seemingly causes some core POSTs to fail 500. Uninstalling Cleantalk solves that particular issue.
TypeError: count(): Argument #1 ($value) must be of type Countable|array, Symfony\Component\HttpFoundation\Request given in count() (line 633 of /var/www/drupal/web/modules/contrib/cleantalk/src/lib/Cleantalk/Common/Helper.php)
#0 /var/www/drupal/web/modules/contrib/cleantalk/src/lib/Cleantalk/Common/Helper.php(633): count(Object(Symfony\Component\HttpFoundation\Request))
#1 /var/www/drupal/web/modules/contrib/cleantalk/src/EventSubscriber/BootSubscriber.php(213): Cleantalk\Common\Helper::get_fields_any(Object(Symfony\Component\HttpFoundation\Request))
#2 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\cleantalk\EventSubscriber\BootSubscriber->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#3 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#4 /var/www/drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#5 /var/www/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#6 /var/www/drupal/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#7 {main}
Comments
Comment #2
znaeff commentedHello.
Thank you for your request.
Please give us 1-2 days for investigations.
Best regards.
Comment #3
serge-m commentedCould you tell us the steps to reproduce the issue?
In our test environment Drupal 9.3.7 the CleanTalk Anti-Spam 9.1.18 works fine without any errors on PHP 8.1.
Or send us a screenshot of the anti-spam settings:
• Drupal9 Admin Page —> Configuration —> Anti-Spam by CleanTalk —> Settings
If you want you can create a private ticket here in our system:
https://cleantalk.org/my/support/open
Thank you.
Comment #4
iainh commentedThanks for responding.
The error presented itself when using CKEditor to embed media in a page being edited.
So I raised an issue with Drupal core and somebody very kindly guided me to inspect both the httpd and Drupal logs (see here)
Inspecting the Drupal log showed the only error / message logged was the PHP Type Error in Cleantalk I reported above.
I had set up the editor media embed per these instructions and these had been working for several Drupal releases, as has Cleantalk as far as I was aware.
Unfortunately, since I have now uninstalled Cleantalk I no longer have the settings which, AFAIK, were working fine.
Comment #5
iainh commentedCleantalk re-installed after re-subscribing.
Seemingly this programming error broke our system since it's all working OK now.
If the lapsed registration is the cause of this snafu, isn't there a more reliable way of reminding the website's administrator? Seems a but harsh to blow the system out of the water with PHP error?
Of course it's quite possible Cleantalk did email us but the email disappeared in the administrator's inboxes.
Comment #6
iainh commented