XF 2.0 Issue sending emails from xenForo

I'm getting the following server error when a user tries to register on the site. No email templates have been altered.

Error:
Code:
InvalidArgumentException: DOMXPath::query(): Invalid expression in selector >> body << in /var/www/html/src/vendor/pelago/emogrifier/Classes/Emogrifier.php on line 370 src/vendor/pelago/emogrifier/Classes/Emogrifier.php:1532

Stack Trace:
Code:
#0 [internal function]: Pelago\Emogrifier->handleXpathError(2, 'DOMXPath::query...', 's...', 370, Array)
#1 src/vendor/pelago/emogrifier/Classes/Emogrifier.php(370): DOMXPath->query('//')
#2 src/vendor/pelago/emogrifier/Classes/Emogrifier.php(289): Pelago\Emogrifier->process(Object(DOMDocument))
#3 src/XF/Mail/Styler.php(36): Pelago\Emogrifier->emogrify()
#4 src/XF/Mail/Mailer.php(189): XF\Mail\Styler->styleHtml('<!DOCTYPE html>...', true, Object(XF\Language))
#5 src/XF/Mail/Mail.php(277): XF\Mail\Mailer->renderMailTemplate('user_email_conf...', Array, Object(XF\Language), Object(XF\Entity\User))
#6 src/XF/Mail/Mail.php(327): XF\Mail\Mail->renderTemplate()
#7 src/XF/Mail/Mail.php(341): XF\Mail\Mail->getSendableMessage()
#8 src/XF/Service/User/AbstractConfirmationService.php(85): XF\Mail\Mail->send()
#9 src/XF/Service/User/AbstractConfirmationService.php(63): XF\Service\User\AbstractConfirmationService->sendConfirmationEmail()
#10 src/XF/Service/User/Registration.php(360): XF\Service\User\AbstractConfirmationService->triggerConfirmation()
#11 src/XF/Service/User/Registration.php(291): XF\Service\User\Registration->sendRegistrationContact()
#12 src/XF/Service/ValidateAndSavableTrait.php(40): XF\Service\User\Registration->_save()
#13 src/XF/Pub/Controller/Register.php(414): XF\Service\User\Registration->save()
#14 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Register->actionRegister(Object(XF\Mvc\ParameterBag))
#15 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Register', 'Register', 'json', Object(XF\Mvc\ParameterBag), '', Object(XF\Pub\Controller\Register), NULL)
#16 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#17 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#18 src/XF.php(329): XF\App->run()
#19 index.php(13): XF::runApp('XF\\Pub\\App')
#20 {main}

Request State:
Code:
array(4) {
  ["url"] => string(28) "/index.php?register/register"
  ["referrer"] => string(33) "https://www.boydcoc.org/index.php"
  ["_GET"] => array(1) {
    ["register/register"] => string(0) ""
  }
  ["_POST"] => array(14) {
    ["username"] => string(0) ""
    ["e7da672f41c4c20c2da6a05309133bd9f3b4bb4f"] => string(15) "REDACTED"
    ["9e24b690930a2cc06da89241b6c12d410468fecd"] => string(27) "REDACTED"
    ["email"] => string(0) ""
    ["password"] => string(8) "********"
    ["6844b14f28da04c172a39c4be8e4a3aacba5751b"] => string(8) "********"
    ["g-recaptcha-response"] => string(334) "03AOLTBLTqv7YGbrgQdqUWv_hz1DvMpeVAIKSg0zPLhHqmfFKheG1Pzez2711HNAxZdVul4f9vFSWMzOMtr0UrgtrGklJaN1Le8mmfKYXD4zv9vJg_pr75tM_WjNw6Ztx-_IhSbJtcVz2lhe5XD1H3638-1Z2BcLMWHmbcRjysKLFcanrhZ7jyYNHdbX_3qySIs3muSB-3KhhESqlSA4qEom418FL9ls8x8q3Em3gmu1voSpFax6thMyynh-7hb-4YjjpinVOpZE7qksZOduG-Ni6uhepKlWOfwvDOKUxS7y5Oo5QzJ8ijFJWPJrrmZWP3QVae0Ifx04CI"
    ["accept"] => string(1) "1"
    ["reg_key"] => string(16) "z2Df6v87d0X-SMuU"
    ["31c44811ce0ecf3a41afdb22860e674bd4f3b2e7"] => string(15) "America/Chicago"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(10) "/index.php"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
I think you might have upgraded to PHP 7.3 but we don't actually support PHP 7.3 until XF 2.0.12 or XF 2.1.0.
We'd recommending upgrading to XF 2.1.0. If you can't do that, downgrading PHP 7.2 will also solve it.
 
I think you might have upgraded to PHP 7.3 but we don't actually support PHP 7.3 until XF 2.0.12 or XF 2.1.0.
We'd recommending upgrading to XF 2.1.0. If you can't do that, downgrading PHP 7.2 will also solve it.
It works :)
thanks
 
Top Bottom