Mailchimp admin/config not accessible

Created on 10 February 2021, over 3 years ago
Updated 4 October 2023, 9 months ago

Problem/Motivation

I cannot get to /admin/config/services/mailchimp. When I try, I get the error *The website encountered an unexpected error. Please try again later.*

Steps to reproduce

[terminal] $ composer require 'drupal/mailchimp:^2.0'
[on drupal site] `/admin/modules` and enable mailchimp
[on drupal site] /admin/config/services/mailchimp

When I check the log, I get the following message

Message ParseError: syntax error, unexpected 'Config' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in Composer\Autoload\includeFile() (line 20 of /var/www/html/web/modules/contrib/mailchimp/src/ClientFactory.php)

#0 /var/www/html/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/var/www/html/w...')
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass('Drupal\\mailchim...')
#2 /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php(257): spl_autoload_call('Drupal\\mailchim...')
#3 /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php(171): Drupal\Component\DependencyInjection\Container->createService(Array, 'mailchimp.clien...')
#4 /var/www/html/web/core/lib/Drupal.php(203): Drupal\Component\DependencyInjection\Container->get('mailchimp.clien...')
#5 /var/www/html/web/modules/contrib/mailchimp/mailchimp.module(41): Drupal::service('mailchimp.clien...')
#6 /var/www/html/web/modules/contrib/mailchimp/src/Form/MailchimpAdminSettingsForm.php(97): mailchimp_get_api_object('MailchimpConnec...')
#7 [internal function]: Drupal\mailchimp\Form\MailchimpAdminSettingsForm->buildForm(Array, Object(Drupal\Core\Form\FormState))
#8 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(532): call_user_func_array(Array, Array)
#9 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(278): Drupal\Core\Form\FormBuilder->retrieveForm('mailchimp_admin...', Object(Drupal\Core\Form\FormState))
#10 /var/www/html/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\mailchimp\Form\MailchimpAdminSettingsForm), Object(Drupal\Core\Form\FormState))
#11 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#12 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#13 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#14 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#15 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#16 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#17 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#18 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(706): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#27 {main}

πŸ’¬ Support request
Status

Active

Version

2.0

Component

General

Created by

πŸ‡¨πŸ‡¦Canada crow

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¬πŸ‡§United Kingdom effortDee

    This is still an issue and I get this error, i will downgrade to 2.0 to see if that works as I cant change PHP version due to other sites on the same server.

  • πŸ‡©πŸ‡ͺGermany Tilo Schumann

    Simliar problem here when I try to update from Drupal 9 to Drupal 10.

    PHP 8.1
    Module-Version: 2.2.2

    Error-Message on admin/config/services/mailchimp

    GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: .api.mailchimp.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://.api.mailchimp.com/3.0/connected-sites in GuzzleHttp\Handler\CurlFactory::createRejection() (line 210 of /usr/www/users/workflow/clemco/clemco8/vendor/guzzlehttp/guzzle/src/Handler/CurlFacto

  • πŸ‡¬πŸ‡§United Kingdom effortDee

    I downgraded to 2.0 and it didn't work.

Production build 0.69.0 2024