- Issue created by @lexsoft
Error: Typed property Mautic\Auth\TwoLeggedOAuth2::$_expires must not be accessed before initialization in Mautic\Auth\TwoLeggedOAuth2->getAccessTokenData() (line 102 of /var/www/html/vendor/mautic/api-library/lib/Auth/TwoLeggedOAuth2.php).
On
Drupal Version
10.4.5
Web Server
nginx/1.28.0
PHP
Version
8.3.21
Try Oauth2, once you get the error you can't access the admin/config/services/mautic page anymore with the following error:
Message Error: Typed property Mautic\Auth\TwoLeggedOAuth2::$_expires must not be accessed before initialization in Mautic\Auth\TwoLeggedOAuth2->getAccessTokenData() (line 102 of /var/www/html/vendor/mautic/api-library/lib/Auth/TwoLeggedOAuth2.php).
Severity Error
#0 /var/www/html/web/modules/contrib/mautic_paragraph/src/Plugin/MauticParagraphConnector/OAuthMauticParagraphConnector.php(173): Mautic\Auth\TwoLeggedOAuth2->getAccessTokenData()
#1 /var/www/html/web/modules/contrib/mautic_paragraph/src/Plugin/MauticParagraphConnector/OAuthMauticParagraphConnector.php(210): Drupal\mautic_paragraph\Plugin\MauticParagraphConnector\OAuthMauticParagraphConnector->getValidAuthenticationObject()
#2 /var/www/html/web/modules/contrib/mautic_paragraph/src/Form/MauticSettingsForm.php(240): Drupal\mautic_paragraph\Plugin\MauticParagraphConnector\OAuthMauticParagraphConnector->getStatus()
#3 /var/www/html/web/modules/contrib/mautic_paragraph/src/Form/MauticSettingsForm.php(159): Drupal\mautic_paragraph\Form\MauticSettingsForm->buildConnectorConfigForm()
#4 [internal function]: Drupal\mautic_paragraph\Form\MauticSettingsForm->buildForm()
#5 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(536): call_user_func_array()
#6 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(284): Drupal\Core\Form\FormBuilder->retrieveForm()
#7 /var/www/html/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#8 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#9 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#10 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#11 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#12 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#13 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#14 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#15 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#16 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#17 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#18 /var/www/html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#19 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(116): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#20 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(90): Drupal\page_cache\StackMiddleware\PageCache->pass()
#21 /var/www/html/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle()
#22 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle()
#23 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#24 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#25 /var/www/html/web/modules/contrib/remove_http_headers/src/StackMiddleware/RemoveHttpHeadersMiddleware.php(49): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#26 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle()
#27 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#28 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#29 {main}Active
1.1
Code