Crashes on install of Drupal CMS

Created on 27 November 2024, 26 days ago

Problem/Motivation

In Slack, there was a report from @penyaskito of a crash on the installation of Drupal CMS. The stack trace for the crash is below. It appears that the update module is sending an email to notify about out of date modules, but other parts of the system are not fully loaded.

[notice] Performed install task: install_configure_form
 [notice] Performed install task: drupal_cms_installer_uninstall_myself
 [warning] Undefined array key "attachments" MailManager.php:194
 [warning] Theme hook easy_email_body_html not found.
 [warning] Theme hook easy_email_body_plain not found.
 [warning] Theme hook symfony_mailer_lite_email not found.
 [error]  Missing text format: .
 [warning] Theme hook symfony_mailer_lite_email not found.
 [error]  ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in DOMDocument->loadHTML() (line 116 of /var/www/html/vendor/tijsverkoyen/css-to-inline-styles/src/CssToInlineStyles.php) #0 /var/www/html/vendor/tijsverkoyen/css-to-inline-styles/src/CssToInlineStyles.php(116): DOMDocument->loadHTML()
#1 /var/www/html/vendor/tijsverkoyen/css-to-inline-styles/src/CssToInlineStyles.php(36): TijsVerkoyen\CssToInlineStyles\CssToInlineStyles->createDomDocumentFromHtml()
#2 /var/www/html/web/modules/contrib/symfony_mailer_lite/src/Plugin/Mail/SymfonyMailer.php(669): TijsVerkoyen\CssToInlineStyles\CssToInlineStyles->convert()
#3 /var/www/html/web/modules/contrib/symfony_mailer_lite/src/Plugin/Mail/SymfonyMailer.php(205): Drupal\symfony_mailer_lite\Plugin\Mail\SymfonyMailer->massageMessageBody()
#4 /var/www/html/web/modules/contrib/mailsystem/src/Adapter.php(43): Drupal\symfony_mailer_lite\Plugin\Mail\SymfonyMailer->format()
#5 /var/www/html/web/core/lib/Drupal/Core/Mail/MailManager.php(290): Drupal\mailsystem\Adapter->format()
#6 /var/www/html/web/core/lib/Drupal/Core/Mail/MailManager.php(181): Drupal\Core\Mail\MailManager->doMail()
#7 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(593): Drupal\Core\Mail\MailManager->Drupal\Core\Mail\{closure}()
#8 /var/www/html/web/core/lib/Drupal/Core/Mail/MailManager.php(180): Drupal\Core\Render\Renderer->executeInRenderContext()
#9 /var/www/html/web/modules/contrib/mailsystem/src/MailsystemManager.php(70): Drupal\Core\Mail\MailManager->mail()
#10 /var/www/html/web/modules/contrib/easy_email/modules/easy_email_override/src/Service/MailManager.php(80): Drupal\mailsystem\MailsystemManager->mail()
#11 /var/www/html/web/modules/contrib/easy_email/src/Service/EmailHandler.php(208): Drupal\easy_email_override\Service\MailManager->mail()
#12 /var/www/html/web/modules/contrib/easy_email/modules/easy_email_override/src/Service/MailManager.php(205): Drupal\easy_email\Service\EmailHandler->sendEmail()
#13 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(593): Drupal\easy_email_override\Service\MailManager->Drupal\easy_email_override\Service\{closure}()
#14 /var/www/html/web/modules/contrib/easy_email/modules/easy_email_override/src/Service/MailManager.php(204): Drupal\Core\Render\Renderer->executeInRenderContext()
#15 /var/www/html/web/core/modules/update/update.fetch.inc(43): Drupal\easy_email_override\Service\MailManager->mail()
#16 /var/www/html/web/core/modules/update/src/Hook/UpdateHooks.php(191): _update_cron_notify()

Steps to reproduce

I have not been able to reproduce the issue. With out of date modules installed, I'm able to get the update module to send an email during install, but it doesn't crash like this.

Proposed resolution

We can add some checks around the two errors in the stack trace to try to prevent this from being a complete crash, though the resulting email will likely be blank.

Remaining tasks

Add the checks in the code.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States zengenuity

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

Comments & Activities

Production build 0.71.5 2024