After updating to WP 6.3 I see the following error if I try to an export

Has anybody else tried to update to WordPress 6.3? After updating to WP 6.3 I see the following error if I try to an export for example a pdf:

PHP Fatal error: Uncaught Error: Class “DOMImplementation” not found in /var/www/html/…/wp-content/plugins/pressbooks/vendor/masterminds/html5/src/HTML5/Parser/DOMTreeBuilder.php:172
Stack trace:
#0 /var/www/html/…/wp-content/plugins/pressbooks/vendor/masterminds/html5/src/HTML5.php(157): Masterminds\HTML5\Parser\DOMTreeBuilder->__construct()
#1 /var/www/html/…/wp-content/plugins/pressbooks/vendor/masterminds/html5/src/HTML5.php(89): Masterminds\HTML5->parse()
#2 /var/www/html/…/wp-content/plugins/pressbooks/inc/class-htmlparser.php(52): Masterminds\HTML5->loadHTML()
#3 /var/www/html/…/wp-content/plugins/pressbooks/inc/modules/export/xhtml/class-xhtml11.php(674): Pressbooks\HtmlParser->loadHTML()
#4 /var/www/html/…/wp-content/plugins/pressbooks/inc/modules/export/xhtml/class-xhtml11.php(663): Pressbooks\Modules\Export\Xhtml\Xhtml11->fixImageAttributes()
#5 /var/www/html/…/wp-content/plugins/pressbooks/inc/modules/export/xhtml/class-xhtml11.php(616): Pressbooks\Modules\Export\Xhtml\Xhtml11->preProcessPostContent()
#6 /var/www/html/…/wp-content/plugins/pressbooks/inc/modules/export/xhtml/class-xhtml11.php(417): Pressbooks\Modules\Export\Xhtml\Xhtml11->preProcessBookContents()
#7 /var/www/html/…/wp-content/plugins/pressbooks/inc/modules/export/xhtml/class-xhtml11.php(294): Pressbooks\Modules\Export\Xhtml\Xhtml11->transformGenerator()
#8 /var/www/html/…/wp-content/plugins/pressbooks/inc/redirect/namespace.php(120): Pressbooks\Modules\Export\Xhtml\Xhtml11->transform()
#9 /var/www/html/…/wp-includes/class-wp-hook.php(310): Pressbooks\Redirect\do_format()
#10 /var/www/html/…/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#11 /var/www/html/…/wp-includes/plugin.php(517): WP_Hook->do_action()
#12 /var/www/html/…/wp-includes/template-loader.php(13): do_action()
#13 /var/www/html/…/wp-blog-header.php(19): require_once(‘…’)
#14 /var/www/html/…/index.php(17): require(‘…’)
#15 {main}

I am using latest version of the Plugin, Aldine and McLuhan and php8.1:

WordPress Configuration

Network Type: Subdirectory
Version: 6.3
Language: en_US
WP_ENV: development
WP_DEBUG: Enabled
Memory Limit: 64M

Pressbooks Configuration

Version: 6.14.0
Book Theme: McLuhan
Book Theme Version: 2.26.1
Root Theme: Aldine
Root Theme Version: 1.19.0

Server Configuration

PHP Version: 8.1.21
MySQL Version: 8.0.33
Webserver Info: Apache/2.4.57 (Ubuntu)

Strange – we’re running 6.3 on our dev networks and haven’t seen this error yet. It looks like it’s telling you that Pressbooks can’t find a required dependency (masterminds/html5) on your instance. Can you look to see what version of masterminds/html5 is defined in the composer.lock file in pressbooks/pressbooks? If you’re running on a dev server, you may want to run composer install in that folder to make sure your dependencies are present and up to date.

“masterminds/html5”: “<2.6”
“masterminds/html5”: “^2.6”,

I am not running on a dev server, so I did not run composer install. Also I am not updating with composer but with the ZIP. Do you have a suggestion based on the above?

Thank you!

@t.dumm No idea – the DOMImplementation class is a built in PHP class, which your system does not appear to be loading properly. You’ll probably need to look at your PHP installation? Without access to your particular server, we can’t troubleshoot this as we’ve not encountered it on any of our hosted infrastructure.

This solved the problem:

sudo apt-get install php8.1-xml

1 Like