Connection to latest version of Mautic v5.1.0 is broken

Created on 3 September 2024, about 1 year ago

Problem/Motivation

Error: Class "Mautic\Auth\TwoLeggedOAuth2" not found in Mautic\Auth\ApiAuth->newAuth() (line 47 of /home/ddune/test-site/public_html/vendor/mautic/api-library/lib/Auth/ApiAuth.php).

Steps to reproduce

Standard configuration - Connection to the latest version of Mautic v5.1.0 is not working. Looks like Mautic library has been updated and no longer works with mautic_paragraph. I tried a workaround, but other issues popped up due to incompatibility with PHP 8.1 requirements.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States subcrim69

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

Comments & Activities

  • Issue created by @subcrim69
  • πŸ‡ΊπŸ‡ΈUnited States subcrim69
  • kajol_sutradhar β†’ changed the visibility of the branch 3471919-oauth-connection-to to hidden.

  • πŸ‡¬πŸ‡§United Kingdom lexsoft London

    Same here, can't use OAuth2.

    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).
    
    Backtrace	
    #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(217): Drupal\mautic_paragraph\Plugin\MauticParagraphConnector\OAuthMauticParagraphConnector->getValidAuthenticationObject()
    #2 /var/www/html/web/modules/contrib/mautic_paragraph/src/Plugin/MauticParagraphConnector/OAuthMauticParagraphConnector.php(129): Drupal\mautic_paragraph\Plugin\MauticParagraphConnector\OAuthMauticParagraphConnector->startAuthorization()
    #3 /var/www/html/web/modules/contrib/mautic_paragraph/src/Form/MauticSettingsForm.php(312): Drupal\mautic_paragraph\Plugin\MauticParagraphConnector\OAuthMauticParagraphConnector->afterSubmit()
    #4 [internal function]: Drupal\mautic_paragraph\Form\MauticSettingsForm->submitForm()
    #5 /var/www/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php(129): call_user_func_array()
    #6 /var/www/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php(67): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers()
    #7 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(597): Drupal\Core\Form\FormSubmitter->doSubmitForm()
    #8 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(326): Drupal\Core\Form\FormBuilder->processForm()
    #9 /var/www/html/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
    #10 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
    #11 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
    #12 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #13 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
    #14 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
    #15 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #16 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
    #17 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
    #18 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
    #19 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
    #20 /var/www/html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
    #21 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(116): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
    #22 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(90): Drupal\page_cache\StackMiddleware\PageCache->pass()
    #23 /var/www/html/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle()
    #24 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle()
    #25 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
    #26 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
    #27 /var/www/html/web/modules/contrib/remove_http_headers/src/StackMiddleware/RemoveHttpHeadersMiddleware.php(49): Drupal\Core\StackMiddleware\AjaxPageState->handle()
    #28 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle()
    #29 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
    #30 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle()
    
Production build 0.71.5 2024