- Issue created by @branram
I have two sites using this module. One is running the latest version of D10, one running the latest version of D9. Both of them use this version of the Hubspot module and the latest version of reCAPTCHA. When attempting to submit a form that is connecting to it's Hubspot version via this module, we get an error on the site: The website encountered an unexpected error. Please try again later. The log shows this:
Error: Class "ReCaptcha\ReCaptcha" not found in recaptcha_captcha_validation() (line 161 of /home/acceptccfree/public_html/modules/contrib/recaptcha/recaptcha.module)
#0 /home/acceptccfree/public_html/modules/contrib/captcha/captcha.module(524): recaptcha_captcha_validation(false, 'Google no captc...', Array, Object(Drupal\Core\Form\FormState))
#1 [internal function]: captcha_validate(Array, Object(Drupal\Core\Form\FormState), Array)
#2 /home/acceptccfree/public_html/core/lib/Drupal/Core/Form/FormValidator.php(282): call_user_func_array('captcha_validat...', Array)
#3 /home/acceptccfree/public_html/core/lib/Drupal/Core/Form/FormValidator.php(238): Drupal\Core\Form\FormValidator->doValidateForm(Array, Object(Drupal\Core\Form\FormState))
#4 /home/acceptccfree/public_html/core/lib/Drupal/Core/Form/FormValidator.php(238): Drupal\Core\Form\FormValidator->doValidateForm(Array, Object(Drupal\Core\Form\FormState))
#5 /home/acceptccfree/public_html/core/lib/Drupal/Core/Form/FormValidator.php(238): Drupal\Core\Form\FormValidator->doValidateForm(Array, Object(Drupal\Core\Form\FormState))
#6 /home/acceptccfree/public_html/core/lib/Drupal/Core/Form/FormValidator.php(118): Drupal\Core\Form\FormValidator->doValidateForm(Array, Object(Drupal\Core\Form\FormState), 'webform_submiss...')
#7 /home/acceptccfree/public_html/core/lib/Drupal/Core/Form/FormBuilder.php(593): Drupal\Core\Form\FormValidator->validateForm('webform_submiss...', Array, Object(Drupal\Core\Form\FormState))
#8 /home/acceptccfree/public_html/core/lib/Drupal/Core/Form/FormBuilder.php(325): Drupal\Core\Form\FormBuilder->processForm('webform_submiss...', Array, Object(Drupal\Core\Form\FormState))
#9 /home/acceptccfree/public_html/core/lib/Drupal/Core/Entity/EntityFormBuilder.php(48): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\webform\WebformSubmissionForm), Object(Drupal\Core\Form\FormState))
#10 /home/acceptccfree/public_html/modules/contrib/webform/src/Entity/Webform.php(1249): Drupal\Core\Entity\EntityFormBuilder->getForm(Object(Drupal\webform\Entity\WebformSubmission), 'add')
#11 /home/acceptccfree/public_html/modules/contrib/webform/src/Element/Webform.php(79): Drupal\webform\Entity\Webform->getSubmissionForm(Array)
#12 [internal function]: Drupal\webform\Element\Webform::preRenderWebformElement(Array)
#13 /home/acceptccfree/public_html/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(101): call_user_func_array(Array, Array)
#14 /home/acceptccfree/public_html/core/lib/Drupal/Core/Render/Renderer.php(788): Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_ren...', 'exception', 'Drupal\\Core\\Ren...')
#15 /home/acceptccfree/public_html/core/lib/Drupal/Core/Render/Renderer.php(374): Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array)
#16 /home/acceptccfree/public_html/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, false)
#17 /home/acceptccfree/public_html/core/lib/Drupal/Core/Template/TwigExtension.php(479): Drupal\Core\Render\Renderer->render(Array)
#18 /home/acceptccfree/public_html/sites/default/files/php/twig/668ddce6bd5da_block.html.twig_yf2y5BYCPU9rBtXGuXDwu_8Ew/yh9qDVUTdGSWt09gLC7rYlSblCZTNda4UApgS-8p6Nc.php(92): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
#19 /home/acceptccfree/public_html/vendor/twig/twig/src/Template.php(182): __TwigTemplate_f078e58e508008a19045c581b45a0c0b->block_content(Array, Array)
#20 /home/acceptccfree/public_html/sites/default/files/php/twig/668ddce6bd5da_block.html.twig_yf2y5BYCPU9rBtXGuXDwu_8Ew/yh9qDVUTdGSWt09gLC7rYlSblCZTNda4UApgS-8p6Nc.php(76): Twig\Template->displayBlock('content', Array, Array)
#21 /home/acceptccfree/public_html/vendor/twig/twig/src/Template.php(405): __TwigTemplate_f078e58e508008a19045c581b45a0c0b->doDisplay(Array, Array)
#22 /home/acceptccfree/public_html/vendor/twig/twig/src/Template.php(378): Twig\Template->displayWithErrorHandling(Array, Array)
#23 /home/acceptccfree/public_html/vendor/twig/twig/src/Template.php(390): Twig\Template->display(Array)
#24 /home/acceptccfree/public_html/core/themes/engines/twig/twig.engine(55): Twig\Template->render(Array)
#25 /home/acceptccfree/public_html/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('themes/custom/v...', Array)
#26 /home/acceptccfree/public_html/core/lib/Drupal/Core/Render/Renderer.php(433): Drupal\Core\Theme\ThemeManager->render('block', Array)
#27 /home/acceptccfree/public_html/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, false)
#28 /home/acceptccfree/public_html/modules/custom/vertex_pagebuilder/includes/utilities.php(77): Drupal\Core\Render\Renderer->render(Array)
#29 /home/acceptccfree/public_html/themes/custom/vertex_brama/gva_content_builder/gva_drupal_block.php(118): vertex_content_builder_render_block('webform')
#30 /home/acceptccfree/public_html/modules/custom/vertex_pagebuilder/includes/frontend.php(94): element_gva_drupal_block->render_content(Array, '')
#31 /home/acceptccfree/public_html/modules/custom/vertex_pagebuilder/includes/frontend.php(40): vertex_pagebuilder_render_element('gva_drupal_bloc...', Array)
#32 /home/acceptccfree/public_html/modules/custom/vertex_pagebuilder/includes/frontend.php(8): vertex_pagebuilder_render_row(Array)
#33 /home/acceptccfree/public_html/modules/custom/vertex_pagebuilder/vertex_pagebuilder.module(348): vertex_pagebuilder_frontend('[{"settings":{"...')
#34 [internal function]: vertex_pagebuilder_preprocess_node(Array, 'node', Array)
#35 /home/acceptccfree/public_html/core/lib/Drupal/Core/Theme/ThemeManager.php(287): call_user_func_array('vertex_pagebuil...', Array)
#36 /home/acceptccfree/public_html/core/lib/Drupal/Core/Render/Renderer.php(433): Drupal\Core\Theme\ThemeManager->render('node', Array)
#37 /home/acceptccfree/public_html/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, false)
#38 /home/acceptccfree/public_html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(242): Drupal\Core\Render\Renderer->render(Array, false)
#39 /home/acceptccfree/public_html/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#40 /home/acceptccfree/public_html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(243): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#41 /home/acceptccfree/public_html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(132): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#42 /home/acceptccfree/public_html/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#43 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#44 /home/acceptccfree/public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#45 /home/acceptccfree/public_html/vendor/symfony/http-kernel/HttpKernel.php(174): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
#46 /home/acceptccfree/public_html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#47 /home/acceptccfree/public_html/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#48 /home/acceptccfree/public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#49 /home/acceptccfree/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#50 /home/acceptccfree/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#51 /home/acceptccfree/public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#52 /home/acceptccfree/public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#53 /home/acceptccfree/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#54 /home/acceptccfree/public_html/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#55 /home/acceptccfree/public_html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#56 {main}