Fatal error when sending email
-
Hi,
I would like to report an issue faced after the update of WPForms lite to version 1.8.7.2 (I didn’t pay attention from which version I made the update).
Here is the stack trace:
[30-Mar-2024 00:04:14 UTC] PHP Fatal error: Uncaught TypeError: DOMNode::removeChild(): Argument #1 ($child) must be of type DOMNode, null given in <path-to-website>/wp-content/plugins/wpforms-lite/vendor_prefixed/tijsverkoyen/css-to-inline-styles/src/CssToInlineStyles.php:112 Stack trace: #0 <path-to-website>/wp-content/plugins/wpforms-lite/vendor_prefixed/tijsverkoyen/css-to-inline-styles/src/CssToInlineStyles.php(112): DOMNode->removeChild() #1 <path-to-website>/wp-content/plugins/wpforms-lite/vendor_prefixed/tijsverkoyen/css-to-inline-styles/src/CssToInlineStyles.php(41): WPForms\Vendor\TijsVerkoyen\CssToInlineStyles\CssToInlineStyles->getHtmlFromDocument() #2 <path-to-website>/wp-content/plugins/wpforms-lite/src/Emails/Styler.php(113): WPForms\Vendor\TijsVerkoyen\CssToInlineStyles\CssToInlineStyles->convert() #3 <path-to-website>/wp-content/plugins/wpforms-lite/src/Emails/Styler.php(131): WPForms\Emails\Styler->process_markup() #4 <path-to-website>/wp-content/plugins/wpforms-lite/src/Emails/Templates/General.php(417): WPForms\Emails\Styler->get() #5 <path-to-website>/wp-content/plugins/wpforms-lite/src/Emails/Templates/General.php(447): WPForms\Emails\Templates\General->save_styled() #6 <path-to-website>/wp-content/plugins/wpforms-lite/src/Emails/Templates/General.php(461): WPForms\Emails\Templates\General->build() #7 <path-to-website>/wp-content/plugins/wpforms-lite/src/Emails/Preview.php(376): WPForms\Emails\Templates\General->get() #8 <path-to-website>/wp-content/plugins/wpforms-lite/src/Emails/Preview.php(102): WPForms\Emails\Preview->preview() #9 <path-to-website>/wp-content/plugins/wpforms-lite/src/WPForms.php(330): WPForms\Emails\Preview->init() #10 <path-to-website>/wp-includes/class-wp-hook.php(324): WPForms\WPForms->WPForms\{closure}() #11 <path-to-website>/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #12 <path-to-website>/wp-includes/plugin.php(517): WP_Hook->do_action() #13 <path-to-website>/wp-admin/admin.php(175): do_action() #14 <path-to-website>/wp-admin/index.php(10): require_once('/home/guni5082/...') #15 {main} thrown in <path-to-website>/wp-content/plugins/wpforms-lite/vendor_prefixed/tijsverkoyen/css-to-inline-styles/src/CssToInlineStyles.php on line 112
The workaround was to change the email template (in the notifications tab in the form settings) from “Classic” to “Plain Text”.
The same issue occurs with “Compact” and “Default Template” templates.
The issue can be triggered either by submitting a form, or by previewing the template (by clicking on “view templates” link just below the template dropdown list and then clicking “Preview” on “Classic” or “Compact” templates).
Hope this helps!
- The topic ‘Fatal error when sending email’ is closed to new replies.