Upgrade from v. 2.0.2 (unsupported) to 2.2.0 fails on Drupal 9.5.x

Created on 26 March 2023, over 1 year ago
Updated 5 November 2023, 11 months ago

Upgrade from Mailchimp 2.0.2 (unsupported) to 2.2.0 fails on Drupal 9.5.7 and PHP 8.1.

Installation with composer generates this error message:
drupal/mailchimp 2.2.0 requires thinkshout/mailchimp-api-php 3.0.0-rc4 -> found thinkshout/mailchimp-api-php[3.0.0-rc4] but it does not match your minimum-stability. ( see issue 🐛 Composer install of 2.2.0 fails on Drupal 10.0.5 w/o prior MailChimp Fixed )

So I properly installed the thinkshout-mailchimp-api-php library with Ludwig before attempting to update the database.

After updating the database, I get this error message and the website becomes unuseable. Clearing the cache and running update.php again won't fix it. Once again, Mailchimp proves to be a can of worms:

The website encountered an unexpected error. Please try again later.
TypeError: explode(): Argument #2 ($string) must be of type string, array given in explode() (line 302 of vendor/thinkshout/mailchimp-api-php/src/Mailchimp.php).

explode() (Line: 302)
Mailchimp\Mailchimp->getDataCenter() (Line: 107)
Mailchimp\Mailchimp->__construct() (Line: 154)
Drupal\mailchimp\ClientFactory->createInstance() (Line: 118)
Drupal\mailchimp\ClientFactory->getInstance() (Line: 84)
Drupal\mailchimp\ClientFactory->getByClassName() (Line: 98)
Drupal\mailchimp\ClientFactory->getByClassNameOrNull() (Line: 44)
mailchimp_get_api_object() (Line: 119)
mailchimp_get_lists() (Line: 113)
Drupal\mailchimp_signup\Form\MailchimpSignupPageForm->buildForm()
call_user_func_array() (Line: 534)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 281)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 222)
Drupal\Core\Form\FormBuilder->getForm() (Line: 94)
Drupal\mailchimp_signup\Plugin\Block\MailchimpSignupSubscribeBlock->build() (Line: 171)
Drupal\block\BlockViewBuilder::preRender()
call_user_func_array() (Line: 101)
Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 788)
Drupal\Core\Render\Renderer->doCallback() (Line: 374)
Drupal\Core\Render\Renderer->doRender() (Line: 446)
Drupal\Core\Render\Renderer->doRender() (Line: 204)
Drupal\Core\Render\Renderer->render() (Line: 479)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 329)
__TwigTemplate_2b4b17896422dc1b736590b0104e2b3c->block_content() (Line: 182)
Twig\Template->displayBlock() (Line: 84)
__TwigTemplate_2b4b17896422dc1b736590b0104e2b3c->doDisplay() (Line: 405)
Twig\Template->displayWithErrorHandling() (Line: 378)
Twig\Template->display() (Line: 390)
Twig\Template->render() (Line: 55)
twig_render_template() (Line: 384)
Drupal\Core\Theme\ThemeManager->render() (Line: 433)
Drupal\Core\Render\Renderer->doRender() (Line: 204)
Drupal\Core\Render\Renderer->render() (Line: 479)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 84)
__TwigTemplate_0a7e477841a7238473319c3831101f95->doDisplay() (Line: 405)
Twig\Template->displayWithErrorHandling() (Line: 378)
Twig\Template->display() (Line: 390)
Twig\Template->render() (Line: 55)
twig_render_template() (Line: 384)
Drupal\Core\Theme\ThemeManager->render() (Line: 433)
Drupal\Core\Render\Renderer->doRender() (Line: 204)
Drupal\Core\Render\Renderer->render() (Line: 162)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 163)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
call_user_func() (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 174)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 718)
Drupal\Core\DrupalKernel->handle() (Line: 19)
💬 Support request
Status

Closed: works as designed

Version

2.2

Component

General

Created by

🇨🇦Canada mediameriquat

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

Comments & Activities

Production build 0.71.5 2024