Breaks parts of Drupal on install

Created on 27 February 2024, 9 months ago
Updated 4 March 2024, 9 months ago

Problem/Motivation

Broken parts of the admin interface after attempting to install this module (via Composer). Everything was successful and I immediately received a "Congratulations!!!" email on enabling the module - but then the site returns with "The website encountered an unexpected error. Try again later."

This is running Drupal 10.2.3 with PHP-FPM 8.3.3

PHP-FPM error log shows:

Uncaught PHP Exception Drupal\Core\Database\DatabaseExceptionWrapper: "SQLSTATE[42883]: Undefined function: 7 ERROR:  function locate(text, unknown) does not exist
LINE 1: ...r_keys" WHERE spamkey = 'exempt-needle-straw' AND LOCATE(spa...
                                                             ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.: SELECT spamvalue FROM "spammaster_keys" WHERE spamkey = :key AND LOCATE(spamvalue, :straw); Array
(
    [:key] => exempt-needle-straw
    [:straw] => system_modules
)
"  at [redacted path]web/core/lib/Drupal/Core/Database/ExceptionHandler.php line 66

I was able to use drush to pm:uninstall the module, which has restored the site. Drupal's log says:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42883]: Undefined function: 7 ERROR: function locate(text, unknown) does not exist LINE 1: ...r_keys" WHERE spamkey = 'exempt-needle-straw' AND LOCATE(spa... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.: SELECT spamvalue FROM "spammaster_keys" WHERE spamkey = :key AND LOCATE(spamvalue, :straw); Array ( [:key] => exempt-needle-straw [:straw] => views_exposed_form ) in Drupal\spammaster\SpamMasterElusiveService->spamMasterIsNeedle() (line 398 of /[redacted]/dev/web/modules/contrib/spammaster/src/SpamMasterElusiveService.php).

Backtrace shows:

#0 [redacted path]/dev/web/core/lib/Drupal/Core/Database/Connection.php(858): Drupal\Core\Database\ExceptionHandler->handleExecutionException()
#1 [redacted path]/dev/web/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php(239): Drupal\Core\Database\Connection->query()
#2 [redacted path]/dev/web/modules/contrib/spammaster/src/SpamMasterElusiveService.php(398): Drupal\pgsql\Driver\Database\pgsql\Connection->query()
#3 [redacted path]/dev/web/modules/contrib/spammaster/spammaster.module(381): Drupal\spammaster\SpamMasterElusiveService->spamMasterIsNeedle()
#4 [redacted path]/dev/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(545): spammaster_form_alter()
#5 [redacted path]/dev/web/core/lib/Drupal/Core/Form/FormBuilder.php(841): Drupal\Core\Extension\ModuleHandler->alter()
#6 [redacted path]/dev/web/core/lib/Drupal/Core/Form/FormBuilder.php(284): Drupal\Core\Form\FormBuilder->prepareForm()
#7 [redacted path]/dev/web/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php(134): Drupal\Core\Form\FormBuilder->buildForm()
#8 [redacted path]/dev/web/core/modules/views/src/ViewExecutable.php(1253): Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase->renderExposedForm()
#9 [redacted path]/dev/web/core/modules/views/src/Plugin/views/display/PathPluginBase.php(392): Drupal\views\ViewExecutable->build()
#10 [redacted path]/dev/web/core/modules/views/src/Plugin/views/display/Page.php(196): Drupal\views\Plugin\views\display\PathPluginBase->execute()
#11 [redacted path]/dev/web/core/modules/views/src/ViewExecutable.php(1645): Drupal\views\Plugin\views\display\Page->execute()
#12 [redacted path]/dev/web/core/modules/views/src/Element/View.php(81): Drupal\views\ViewExecutable->executeDisplay()
#13 [internal function]: Drupal\views\Element\View::preRenderViewElement()
#14 [redacted path]/dev/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(111): call_user_func_array()
#15 [redacted path]/dev/web/core/lib/Drupal/Core/Render/Renderer.php(858): Drupal\Core\Render\Renderer->doTrustedCallback()
#16 [redacted path]/dev/web/core/lib/Drupal/Core/Render/Renderer.php(421): Drupal\Core\Render\Renderer->doCallback()
#17 [redacted path]/dev/web/core/lib/Drupal/Core/Render/Renderer.php(240): Drupal\Core\Render\Renderer->doRender()
#18 [redacted path]/dev/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(238): Drupal\Core\Render\Renderer->render()
#19 [redacted path]/dev/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#20 [redacted path]/dev/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(231): Drupal\Core\Render\Renderer->executeInRenderContext()
#21 [redacted path]/dev/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(128): Drupal\Core\Render\MainContent\HtmlRenderer->prepare()
#22 [redacted path]/dev/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
#23 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
#24 [redacted path]/dev/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#25 [redacted path]/dev/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#26 [redacted path]/dev/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#27 [redacted path]/dev/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#28 [redacted path]/dev/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#29 [redacted path]/dev/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#30 [redacted path]/dev/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#31 [redacted path]/dev/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#32 [redacted path]/dev/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#33 [redacted path]/dev/web/modules/contrib/activitypub/src/StackMiddleware/FormatSetter.php(44): Drupal\page_cache\StackMiddleware\PageCache->handle()
#34 [redacted path]/dev/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\activitypub\StackMiddleware\FormatSetter->handle()
#35 [redacted path]/dev/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#36 [redacted path]/dev/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#37 [redacted path]/dev/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#38 [redacted path]/dev/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#39 [redacted path]/dev/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#40 {main}
🐛 Bug report
Status

Fixed

Version

2.33

Component

Code

Created by

🇨🇦Canada kinetix242

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kinetix242
  • 🇵🇹Portugal pedro-alves

    Hi kinetix242,

    I don't see your database type, guessing your are using PostgreSQL instead of MySQL. Please install version 2.34 and let us know if that fixes the issue for you.

  • Assigned to pedro-alves
  • Status changed to Needs review 9 months ago
  • 🇵🇹Portugal pedro-alves

    Please test with just release version 2.35 as we needed to make a few adjustments.
    Let us know if above version fixes the issue.

  • 🇨🇦Canada kinetix242

    Hi there,

    Yes, sorry that I forgot to mention that I'm using Postgresql.

    I've just installed 2.35, upon enabling the module, Drupal shows an error dialog stating:

    Spam Master Free license could not be created. License status is: MALFUNCTION_4. Check Spam Master configuration page and read more about statuses.
        Spam Master MALFUNCTION 4 detected. You are not Protected!!! Not able to automatically Generate a FREE Connection Key on your server, most likely reason is the Settings > General > Administration Email Address -> webmaster@humanwords.cc already in use with a key. Please login at www.spammaster.org with webmaster@humanwords.cc to retrieve your license key and insert in drupal Configuration -> Spam master Settings.

    So, I went and put the license key I received during yesterday's install in to spam master's configuration, and then Drupal breakage occurred: "The website encountered an unexpected error. Try again later."

    After disabling the module again, the logs show:

    Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42883]: Undefined function: 7 ERROR: function locate(text, unknown) does not exist LINE 1: ...r_keys" WHERE spamkey = 'exempt-needle-straw' AND LOCATE(spa... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.: SELECT spamvalue FROM "spammaster_keys" WHERE spamkey = :key AND LOCATE(spamvalue, :straw); Array ( [:key] => exempt-needle-straw [:straw] => CAST(spammaster_settings_form AS TEXT) ) in Drupal\spammaster\SpamMasterElusiveService->spamMasterIsNeedle() (line 398 of [recadcted]/dev/web/modules/contrib/spammaster/src/SpamMasterElusiveService.php).

    and

    #0 /[redacted]/dev/web/core/lib/Drupal/Core/Database/Connection.php(858): Drupal\Core\Database\ExceptionHandler->handleExecutionException()
    #1 /[redacted]/dev/web/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php(239): Drupal\Core\Database\Connection->query()
    #2 /[redacted]/dev/web/modules/contrib/spammaster/src/SpamMasterElusiveService.php(398): Drupal\pgsql\Driver\Database\pgsql\Connection->query()
    #3 /[redacted]/dev/web/modules/contrib/spammaster/spammaster.module(381): Drupal\spammaster\SpamMasterElusiveService->spamMasterIsNeedle()
    #4 /[redacted]/dev/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(545): spammaster_form_alter()
    #5 /[redacted]/dev/web/core/lib/Drupal/Core/Form/FormBuilder.php(841): Drupal\Core\Extension\ModuleHandler->alter()
    #6 /[redacted]/dev/web/core/lib/Drupal/Core/Form/FormBuilder.php(284): Drupal\Core\Form\FormBuilder->prepareForm()
    #7 /[redacted]/dev/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
    #8 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
    #9 /[redacted]/dev/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
    #10 /[redacted]/dev/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #11 /[redacted]/dev/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
    #12 /[redacted]/dev/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
    #13 /[redacted]/dev/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #14 /[redacted]/dev/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
    #15 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
    #16 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
    #17 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
    #18 /[redacted]/dev/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
    #19 /[redacted]/dev/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
    #20 /[redacted]/dev/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
    #21 /[redacted]/dev/web/modules/contrib/activitypub/src/StackMiddleware/FormatSetter.php(44): Drupal\page_cache\StackMiddleware\PageCache->handle()
    #22 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\activitypub\StackMiddleware\FormatSetter->handle()
    #23 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
    #24 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
    #25 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
    #26 /[redacted]/dev/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
    #27 /[redacted]/dev/web/index.php(19): Drupal\Core\DrupalKernel->handle()
    #28 {main}
  • 🇵🇹Portugal pedro-alves

    Hi kinetix242,
    Thanks for taking a look.
    Since you have Postgresql are you able to make a few tests in your dev machine?
    If so, please drop me a line via https://www.spammaster.org/contact/

  • 🇨🇦Canada kinetix242

    I should be able to, yes.

  • 🇵🇹Portugal pedro-alves

    ah I think I see the issue. Locate is not available in PostgreSQL. Position should work for both PostgreSQL and MySQL.
    If you have time please change line 398 of file [recadcted]/dev/web/modules/contrib/spammaster/src/SpamMasterElusiveService.php

    from:
    LOCATE(spamvalue, :straw)
    to:
    POSITION(spamvalue IN :straw)

    The locate function is used in 2 files, but if it clears the error on 398 we can launch an update that applies to all instances.

  • 🇨🇦Canada kinetix242

    OK, after making the change, this is what the error situation looks like:

    Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42804]: Datatype mismatch: 7 ERROR: argument of AND must be type boolean, not type integer LINE 1: ...r_keys" WHERE spamkey = 'exempt-needle-straw' AND POSITION(s... ^: SELECT spamvalue FROM "spammaster_keys" WHERE spamkey = :key AND POSITION(spamvalue IN :straw); Array ( [:key] => exempt-needle-straw [:straw] => CAST(spammaster_settings_form AS TEXT) ) in Drupal\spammaster\SpamMasterElusiveService->spamMasterIsNeedle() (line 398 of /[redacted]/dev/web/modules/contrib/spammaster/src/SpamMasterElusiveService.php).

    and

    #0 /[redacted]/dev/web/core/lib/Drupal/Core/Database/Connection.php(858): Drupal\Core\Database\ExceptionHandler->handleExecutionException()
    #1 /[redacted]/dev/web/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php(239): Drupal\Core\Database\Connection->query()
    #2 /[redacted]/dev/web/modules/contrib/spammaster/src/SpamMasterElusiveService.php(398): Drupal\pgsql\Driver\Database\pgsql\Connection->query()
    #3 /[redacted]/dev/web/modules/contrib/spammaster/spammaster.module(381): Drupal\spammaster\SpamMasterElusiveService->spamMasterIsNeedle()
    #4 /[redacted]/dev/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(545): spammaster_form_alter()
    #5 /[redacted]/dev/web/core/lib/Drupal/Core/Form/FormBuilder.php(841): Drupal\Core\Extension\ModuleHandler->alter()
    #6 /[redacted]/dev/web/core/lib/Drupal/Core/Form/FormBuilder.php(284): Drupal\Core\Form\FormBuilder->prepareForm()
    #7 /[redacted]/dev/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
    #8 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
    #9 /[redacted]/dev/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
    #10 /[redacted]/dev/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #11 /[redacted]/dev/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
    #12 /[redacted]/dev/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
    #13 /[redacted]/dev/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #14 /[redacted]/dev/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
    #15 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
    #16 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
    #17 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
    #18 /[redacted]/dev/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
    #19 /[redacted]/dev/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
    #20 /[redacted]/dev/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
    #21 /[redacted]/dev/web/modules/contrib/activitypub/src/StackMiddleware/FormatSetter.php(44): Drupal\page_cache\StackMiddleware\PageCache->handle()
    #22 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\activitypub\StackMiddleware\FormatSetter->handle()
    #23 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
    #24 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
    #25 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
    #26 /[redacted]/dev/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
    #27 /[redacted]/dev/web/index.php(19): Drupal\Core\DrupalKernel->handle()
    #28 {main}
  • 🇵🇹Portugal pedro-alves

    I see. Same file line 400 please change and post back.

    from:
    ':straw' => 'CAST(' . $spamFormId . ' AS TEXT)',
    to:
    ':straw' => $spamFormId,

  • 🇵🇹Portugal pedro-alves

    We've launched version 2.36 that solves a few issues with PostgreSQL.
    At a later release we will test with a PostgreSQL test bench.

  • Status changed to Closed: cannot reproduce 9 months ago
  • 🇨🇦Canada kinetix242

    Hi there... sorry I wasn't able to get my hands in to this the past couple of days.

    I've just updated the module to 2.36 and there still appears to be more to work through:

    Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42804]: Datatype mismatch: 7 ERROR: argument of AND must be type boolean, not type integer LINE 1: ...r_keys" WHERE spamkey = 'exempt-needle-straw' AND POSITION(s... ^: SELECT spamvalue FROM "spammaster_keys" WHERE spamkey = :key AND POSITION(spamvalue IN :straw); Array ( [:key] => exempt-needle-straw [:straw] => spammaster_settings_form ) in Drupal\spammaster\SpamMasterElusiveService->spamMasterIsNeedle() (line 398 of /[redacted]/dev/web/modules/contrib/spammaster/src/SpamMasterElusiveService.php).

    and

    #0 /[redacted]/dev/web/core/lib/Drupal/Core/Database/Connection.php(858): Drupal\Core\Database\ExceptionHandler->handleExecutionException()
    #1 /[redacted]/dev/web/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php(239): Drupal\Core\Database\Connection->query()
    #2 /[redacted]/dev/web/modules/contrib/spammaster/src/SpamMasterElusiveService.php(398): Drupal\pgsql\Driver\Database\pgsql\Connection->query()
    #3 /[redacted]/dev/web/modules/contrib/spammaster/spammaster.module(382): Drupal\spammaster\SpamMasterElusiveService->spamMasterIsNeedle()
    #4 /[redacted]/dev/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(545): spammaster_form_alter()
    #5 /[redacted]/dev/web/core/lib/Drupal/Core/Form/FormBuilder.php(841): Drupal\Core\Extension\ModuleHandler->alter()
    #6 /[redacted]/dev/web/core/lib/Drupal/Core/Form/FormBuilder.php(284): Drupal\Core\Form\FormBuilder->prepareForm()
    #7 /[redacted]/dev/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
    #8 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
    #9 /[redacted]/dev/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
    #10 /[redacted]/dev/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #11 /[redacted]/dev/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
    #12 /[redacted]/dev/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
    #13 /[redacted]/dev/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #14 /[redacted]/dev/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
    #15 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
    #16 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
    #17 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
    #18 /[redacted]/dev/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
    #19 /[redacted]/dev/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
    #20 /[redacted]/dev/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
    #21 /[redacted]/dev/web/modules/contrib/activitypub/src/StackMiddleware/FormatSetter.php(44): Drupal\page_cache\StackMiddleware\PageCache->handle()
    #22 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\activitypub\StackMiddleware\FormatSetter->handle()
    #23 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
    #24 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
    #25 /[redacted]/dev/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
    #26 /[redacted]/dev/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
    #27 /[redacted]/dev/web/index.php(19): Drupal\Core\DrupalKernel->handle()
    #28 {main}

  • Status changed to Active 9 months ago
  • 🇵🇹Portugal pedro-alves

    That looks related to PHP version. Are you running PHP 7.x.x?

  • 🇨🇦Canada kinetix242

    Nope, running PHP-FPM 8.3.3

  • 🇨🇦Canada kinetix242

    Tried making the change suggested, though, and now have this:

    Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42804]: Datatype mismatch: 7 ERROR: argument of AND must be type boolean, not type integer LINE 1: ...eys" WHERE spamkey = 'exempt-needle-sig-hide' AND POSITION(s... ^: SELECT spamvalue FROM "spammaster_keys" WHERE spamkey = :key AND POSITION(spamvalue IN :sighide); Array ( [:key] => exempt-needle-sig-hide [:sighide] => spammaster_settings_form ) in Drupal\spammaster\SpamMasterElusiveService->spamMasterIsNeedle() (line 407 of /[redacted]/dev/web/modules/contrib/spammaster/src/SpamMasterElusiveService.php).

    and

    #0 /[redcated]/dev/web/core/lib/Drupal/Core/Database/Connection.php(858): Drupal\Core\Database\ExceptionHandler->handleExecutionException()
    #1 /[redcated]/dev/web/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php(239): Drupal\Core\Database\Connection->query()
    #2 /[redcated]/dev/web/modules/contrib/spammaster/src/SpamMasterElusiveService.php(407): Drupal\pgsql\Driver\Database\pgsql\Connection->query()
    #3 /[redcated]/dev/web/modules/contrib/spammaster/spammaster.module(382): Drupal\spammaster\SpamMasterElusiveService->spamMasterIsNeedle()
    #4 /[redcated]/dev/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(545): spammaster_form_alter()
    #5 /[redcated]/dev/web/core/lib/Drupal/Core/Form/FormBuilder.php(841): Drupal\Core\Extension\ModuleHandler->alter()
    #6 /[redcated]/dev/web/core/lib/Drupal/Core/Form/FormBuilder.php(284): Drupal\Core\Form\FormBuilder->prepareForm()
    #7 /[redcated]/dev/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
    #8 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
    #9 /[redcated]/dev/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
    #10 /[redcated]/dev/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #11 /[redcated]/dev/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
    #12 /[redcated]/dev/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
    #13 /[redcated]/dev/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #14 /[redcated]/dev/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
    #15 /[redcated]/dev/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
    #16 /[redcated]/dev/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
    #17 /[redcated]/dev/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
    #18 /[redcated]/dev/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
    #19 /[redcated]/dev/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
    #20 /[redcated]/dev/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
    #21 /[redcated]/dev/web/modules/contrib/activitypub/src/StackMiddleware/FormatSetter.php(44): Drupal\page_cache\StackMiddleware\PageCache->handle()
    #22 /[redcated]/dev/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\activitypub\StackMiddleware\FormatSetter->handle()
    #23 /[redcated]/dev/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
    #24 /[redcated]/dev/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
    #25 /[redcated]/dev/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
    #26 /[redcated]/dev/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
    #27 /[redcated]/dev/web/index.php(19): Drupal\Core\DrupalKernel->handle()
    #28 {main}
  • 🇵🇹Portugal pedro-alves

    Line 398 got fixed line and jumped to line 407... that's all I wanted to test.
    Please update to version 2.37 and report back.
    Thanks

  • Status changed to Needs review 9 months ago
  • 🇨🇦Canada kinetix242

    No errors this time around!

  • 🇵🇹Portugal pedro-alves

    Awesome. I will close this one as fixed as all values are changed and escaped for the position function.

    POSITION(spamvalue IN :straw) > :value", [
          ':key' => 'exempt-needle-straw',
          ':straw' => $spamFormId,
          ':value' => 0,

    If you find anything else just create another issue. I'm happy to extend compatibility to PostgreSQL.

  • Status changed to Fixed 9 months ago
  • Status changed to Fixed 9 months ago
Production build 0.71.5 2024