- Issue created by @micahw156
Update Status policy crashes in Drupal 11 due to missing update_requirements()
.
Error: Call to undefined function Drupal\symfony_mailer\Plugin\EmailBuilder\update_requirements() in .../modules/contrib/symfony_mailer/src/Plugin/EmailBuilder/UpdateEmailBuilder.php on line 64 #0 [internal function]: Drupal\symfony_mailer\Plugin\EmailBuilder\UpdateEmailBuilder->build()
(This location is from 1.6.x release but 2.x/src/Plugin/Mailer/UpdateMailer.php
is also affected.)
Issue
π
Convert hook requirements that do not interact with install time
Active
removed hooks from update.install, including update_requirements()
, and replaced them with Drupal\update\Hook\UpdateRequirements
. These calls will need to be replaced in the mailer policies.
Install Drupal 11.2.0 or higher and enable the Update Status mailer policy. Drupal will crash when attempting to send a status email message.
I'm reluctant to elevate priority on this, but this has been causing cron runs to crash in my production environment.
This bug can be mitigated by disabling the Update Status policy and letting Drupal core generate the email message text.
Calls to update_requirements()
will need to be replaced with calls to (I think) UpdateRequirements::runtime()
, but I am not sure that the new autowired hook services can be injected as dependencies, so I currently have no recommendations about how to make this work.
Active
2.0
Policy