- Issue created by @loze
- 🇺🇸United States loze Los Angeles
trying to rebuild cache give me this
Warning: Undefined array key "config_overrides" in /Users/.../web/modules/contrib/symfony_mailer/src/Processor/EmailBuilderManager.php on line 222
- First commit to issue fork.
- last update
almost 2 years ago 5 pass - @sakthi_dev opened merge request.
- Status changed to Needs review
almost 2 years ago 12:26pm 21 April 2023 - 🇬🇧United Kingdom adamps
I think it might have been fixed by https://www.drupal.org/project/symfony_mailer/issues/3315358#comment-150... ✨ Allow full management of override plugins Fixed - please can you test again?
Thanks for MR but I don't think that's the problem.
- Status changed to Closed: outdated
almost 2 years ago 4:11pm 30 April 2023 - 🇬🇧United Kingdom adamps
See #9 hopefully already fixed, please re-open if not
- Status changed to Active
over 1 year ago 5:23pm 18 July 2023 - 🇬🇧United Kingdom kenorb
I'm using 1.3.0-rc2 (which seems to be having the latest patch from #3315358) and I still have the same error. Happens on "drush status".
# composer exec -- drush -r web status [warning] Undefined array key "config_overrides" MailerConfigOverride.php:93 [error] TypeError: array_merge(): Argument #2 must be of type array, null given in array_merge() (line 93 of /var/www/html/drupal/web/modules/contrib/symfony_mailer/src/Processor/MailerConfigOverride.php) #0 /var/www/html/drupal/web/modules/contrib/symfony_mailer/src/Processor/MailerConfigOverride.php(93): array_merge() #1 /var/www/html/drupal/web/modules/contrib/symfony_mailer/src/Processor/MailerConfigOverride.php(52): Drupal\symfony_mailer\Processor\MailerConfigOverride->buildCache() #2 /var/www/html/drupal/web/core/lib/Drupal/Core/Config/ConfigFactory.php(209): Drupal\symfony_mailer\Processor\MailerConfigOverride->loadOverrides() #3 /var/www/html/drupal/web/core/lib/Drupal/Core/Config/ConfigFactory.php(169): Drupal\Core\Config\ConfigFactory->loadOverrides() #4 /var/www/html/drupal/web/core/lib/Drupal/Core/Config/ConfigFactory.php(104): Drupal\Core\Config\ConfigFactory->doLoadMultiple() #5 /var/www/html/drupal/web/core/lib/Drupal/Core/Config/ConfigFactory.php(89): Drupal\Core\Config\ConfigFactory->doGet() #6 /var/www/html/drupal/web/core/lib/Drupal/Core/Extension/ThemeHandler.php(70): Drupal\Core\Config\ConfigFactory->get() #7 /var/www/html/drupal/web/core/lib/Drupal/Core/Template/Loader/FilesystemLoader.php(46): Drupal\Core\Extension\ThemeHandler->listInfo() ...
- Status changed to Needs work
over 1 year ago 5:29pm 18 July 2023 - Status changed to Fixed
over 1 year ago 5:33pm 18 July 2023 - 🇬🇧United Kingdom kenorb
Actually I've run "drush cr" and the error was gone. So it's probably fixed in #3315358 as mentioned.
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
over 1 year ago 7:53am 2 August 2023 - 🇧🇪Belgium flyke
I still have this error.
Was using latest stable release, was creating a new policy but could not add a body field because of Ajax error.
Found via issue queue that this should be fixed in latest Dev version, so then I used the dev version (installed via composer of course and ran drush updb and drush cr).Since then I have this problem. I also tried using 1.3.0-rc3 but that gives the same problem.
Since then, I cannot even access admin/config/system/mailer anymore:
The website encountered an unexpected error. Please try again later. TypeError: array_merge(): Argument #2 must be of type array, null given in array_merge() (line 93 of modules/contrib/symfony_mailer/src/Processor/MailerConfigOverride.php). array_merge(Array, NULL) (Line: 93) Drupal\symfony_mailer\Processor\MailerConfigOverride->buildCache() (Line: 52) Drupal\symfony_mailer\Processor\MailerConfigOverride->loadOverrides(Array) (Line: 209) Drupal\Core\Config\ConfigFactory->loadOverrides(Array) (Line: 169) Drupal\Core\Config\ConfigFactory->doLoadMultiple(Array, 1) (Line: 104) Drupal\Core\Config\ConfigFactory->doGet('system.date') (Line: 89) Drupal\Core\Config\ConfigFactory->get('system.date') (Line: 90) Drupal\system\TimeZoneResolver->getTimeZone() (Line: 53) Drupal\system\TimeZoneResolver->setDefaultTimeZone(Object, 'account.set', Object) call_user_func(Array, Object, 'account.set', Object) (Line: 142) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'account.set') (Line: 65) Drupal\Core\Session\AccountProxy->setAccount(Object) (Line: 79) Drupal\Core\EventSubscriber\AuthenticationSubscriber->onKernelRequestAuthenticate(Object, 'kernel.request', Object) call_user_func(Array, Object, 'kernel.request', Object) (Line: 142) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.request') (Line: 145) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- 🇬🇧United Kingdom adamps
And that showed me that the custom EmailBuilder I'm trying to create is indeed missing a 'config_overrides' key:
config_overrides is set to [] in the EmailBuilder annotation, so you don't need to change your code.
There seems to be something strange going on during the upgrade - maybe it hits the bug before it has read the new annotation class?
- 🇬🇧United Kingdom adamps
There's now an issue for #15: 🐛 Upgrade leads to array_merge(): Argument #2 must be of type array, null given Fixed