ghandic / nbconvert

Wordpress plugin to convert notebooks into blog posts
MIT License
35 stars 45 forks source link

Uncaught Error: Class 'DOMDocument' not found in nbconvert.php on line 119 #8

Closed yareblo closed 4 years ago

yareblo commented 4 years ago

Hi Andy,

I would love to use the plugin. Unfortunately, there seems to be an issue. I am using WordPress 5.3 and PHP 7.0.33. When saving a post with the example, I get an error. When I open the post, there is the following error-code:

Uncaught Error: Class 'DOMDocument' not found in /var/www/html/wordpress/wp-content/plugins/nbconvert/nbconvert.php on line 119

nbconvert_getHTMLByID()
wp-content/plugins/nbconvert/nbconvert.php:88
nbconvert_function()
wp-content/plugins/nbconvert/nbconvert.php:13
nbconvert_handler()
wp-includes/shortcodes.php:325
do_shortcode_tag()
preg_replace_callback()
wp-includes/shortcodes.php:199
do_shortcode()
wp-includes/class-wp-hook.php:288
apply_filters()
wp-includes/plugin.php:206
apply_filters()
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:1550
prepare_item_for_response()
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:472
get_item()
wp-includes/rest-api/class-wp-rest-server.php:946
dispatch()
wp-includes/rest-api.php:429
rest_do_request()
wp-includes/rest-api.php:1539
rest_preload_api_request()
array_reduce()
wp-admin/edit-form-blocks.php:77
include()
wp-admin/post.php:179

Any solution?

Thanks!

yareblo commented 4 years ago

Issue was solved by installing php-xml:

sudo apt-get install php-xml

Great Add-In!