Update Mailchimp Mergevar Values Batch fails

Created on 27 October 2023, 8 months ago
Updated 9 December 2023, 7 months ago

On my production site I am running Version 8.x-1.12 of this module and going to the Fields page and running Update Mailchimp Mergevar Values works fine.

On my cloned test site I have updated to version 2.2.2 and now get the following during the batch run:

Mailchimp Merge Variable Update Failed.
Please continue to the error page

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /batch?id=2981&op=do_nojs&op=do
StatusText: parsererror
ResponseText: 

And the following is logged:

Error: Cannot access private property Mailchimp\Mailchimp2::$batch_operations in Mailchimp\MailchimpApiUser->processBatchOperations() (line 98 of /code/vendor/thinkshout/mailchimp-api-php/src/MailchimpApiUser.php)
#0 /code/web/modules/composer/mailchimp/mailchimp.module(789): Mailchimp\MailchimpApiUser->processBatchOperations()
#1 /code/web/modules/composer/mailchimp/modules/mailchimp_lists/mailchimp_lists.module(510): mailchimp_batch_update_members('9c69c2c844', Array, false, true, false)
#2 /code/web/core/includes/batch.inc(295): mailchimp_lists_execute_mergevar_batch_update('9c69c2c844', Array)
#3 /code/web/core/includes/batch.inc(137): _batch_process()
#4 /code/web/core/includes/batch.inc(93): _batch_do()
#5 /code/web/core/modules/system/src/Controller/BatchController.php(55): _batch_page(Object(Symfony\Component\HttpFoundation\Request))
#6 [internal function]: Drupal\system\Controller\BatchController->batchPage(Object(Symfony\Component\HttpFoundation\Request))
#7 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#8 /code/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#9 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#10 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#11 /code/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#12 /code/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#13 /code/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#14 /code/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /code/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /code/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /code/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /code/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /code/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /code/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#23 {main}

Looks like the mailchimp library is broken? vendor/thinkshout/mailchimp-api-php/src/Mailchimp.php line 97:
private $batch_operations;

I've run composer update and am on the latest version.

Looks like it's this issue here: https://github.com/thinkshout/mailchimp-api-php/issues/119 - which has been open for over a year!

πŸ› Bug report
Status

Closed: outdated

Version

2.2

Component

API

Created by

πŸ‡¬πŸ‡§United Kingdom Matt B

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

Comments & Activities

Production build 0.69.0 2024