Fatal error with latest dev release

Created on 20 April 2023, almost 2 years ago
Updated 6 August 2023, over 1 year ago

Tried the latest dev release (20 Apr 2023) and I get the following error

Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, null given in /Users/.../web/modules/contrib/symfony_mailer/src/Processor/EmailBuilderManager.php:222

Stack trace:
#0 /Users/.../web/modules/contrib/symfony_mailer/src/Processor/EmailBuilderManager.php(222): array_merge(Array, NULL)
#1 /Users/.../web/modules/contrib/symfony_mailer/src/Processor/EmailBuilderManager.php(179): Drupal\symfony_mailer\Processor\EmailBuilderManager->buildCache()
#2 /Users/.../web/core/lib/Drupal/Core/Config/ConfigFactory.php(209): Drupal\symfony_mailer\Processor\EmailBuilderManager->loadOverrides(Array)
#3 /Users/.../web/core/lib/Drupal/Core/Config/ConfigFactory.php(169): Drupal\Core\Config\ConfigFactory->loadOverrides(Array)
#4 /Users/.../web/core/lib/Drupal/Core/Config/ConfigFactory.php(104): Drupal\Core\Config\ConfigFactory->doLoadMultiple(Array, true)
#5 /Users/.../web/core/lib/Drupal/Core/Config/ConfigFactory.php(89): Drupal\Core\Config\ConfigFactory->doGet('sophron.setting...')
#6 /Users/.../web/modules/contrib/sophron/src/MimeMapManager.php(83): Drupal\Core\Config\ConfigFactory->get('sophron.setting...')
#7 /Users/.../web/core/lib/Drupal/Component/DependencyInjection/Container.php(259): Drupal\sophron\MimeMapManager->__construct(Object(Drupal\Core\Config\ConfigFactory), Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher), Object(Drupal\Core\Extension\ModuleHandler))
#8 /Users/.../web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'sophron.mime_ma...')
#9 /Users/.../web/core/lib/Drupal/Component/DependencyInjection/Container.php(434): Drupal\Component\DependencyInjection\Container->get('sophron.mime_ma...', 1)
#10 /Users/.../web/core/lib/Drupal/Component/DependencyInjection/Container.php(237): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#11 /Users/.../web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'drupal.proxy_or...')
#12 /Users/.../web/core/lib/Drupal/Component/DependencyInjection/Container.php(434): Drupal\Component\DependencyInjection\Container->get('drupal.proxy_or...', 1)
🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇺🇸United States loze Los Angeles

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

Comments & Activities

  • Issue created by @loze
  • 🇺🇸United States loze Los Angeles
  • 🇺🇸United States loze Los Angeles
  • 🇺🇸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

  • 🇺🇸United States loze Los Angeles
  • First commit to issue fork.
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update almost 2 years ago
    5 pass
  • @sakthi_dev opened merge request.
  • Status changed to Needs review almost 2 years ago
  • 🇮🇳India sakthi_dev

    Please review.

  • 🇬🇧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
  • 🇬🇧United Kingdom adamps

    See #9 hopefully already fixed, please re-open if not

  • Status changed to Active over 1 year ago
  • 🇬🇧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
  • Status changed to Fixed over 1 year ago
  • 🇬🇧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
  • 🇧🇪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?

Production build 0.71.5 2024