Error: Class ‘DOMDocument’ not found in Drupal\Component\Utility\Html::load() (line 286 of core/lib/Drupal/Component/Utility/Html.php)

0
(0)

After a Debian update my Drupal 9 installation can not show single nodes and spits the following error.

Error: Class ‘DOMDocument’ not found in DrupalComponentUtilityHtml::load() (line 286 of core/lib/Drupal/Component/Utility/Html.php).

I have no clue what to do and have installed all required php extensions, following some other issues with the same error.

I already removed all suspicious contrib modules and I am lost now with a broken project.

That sound like it can’t find php Dom extension, to get that try sudo apt-get install php{VERSION}-xml, it should solve your problem

like php7.3-xml , php7.4-xml… etc
# apt-get install php7.3-xml
# systemctl restart apache2

Similar Posts:

1,560

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Scroll to Top