Skip to content

error after updating coblocks #2617

Closed

Description

@shirleybl

After updating WordPress and Coblocks from 2.6.0 to 3.1.12, we are no longer able to edit pages that were created using reusable blocks. When clicking on Edit we are getting an error, There has been a critical error on this website. Please check your site admin email inbox for instructions.

In the recovery mode it says that the plugin - Coblocks has caused the error:
Error Details

An error of type E_ERROR was caused in line 47 of the file /data/web/test-fmc-treasury.govnet.qld.gov.au/live/wp-content/plugins/coblocks/includes/block-migrate/class-coblocks-block-migration.php. Error message: Uncaught Error: Class 'DOMDocument' not found in /data/web/test-fmc-treasury.govnet.qld.gov.au/live/wp-content/plugins/coblocks/includes/block-migrate/class-coblocks-block-migration.php:47
Stack trace:
#0 /data/web/test-fmc-treasury.govnet.qld.gov.au/live/wp-content/plugins/coblocks/includes/block-migrate/class-coblocks-block-migration-runner.php(47): CoBlocks_Block_Migration->__construct()
#1 [internal function]: CoBlocks_Block_Migration_Runner->migrate_block()
#2 /data/web/test-fmc-treasury.govnet.qld.gov.au/live/wp-content/plugins/coblocks/includes/block-migrate/loader.php(52): array_map()
#3 /data/web/test-fmc-treasury.govnet.qld.gov.au/live/wp-includes/class-wp-hook.php(326): CoBlocks->{closure}()
#4 /data/web/test-fmc-treasury.govnet.qld.gov.au/live/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#5 /data/web/test-fmc-treasury.govnet.qld.gov.au/live/wp-includes/plugin.php(565): WP_Hook->do_action()
#6 /data/web/test-fmc-treasury.govnet.qld.gov.au/live/wp-includes/class-wp-query.php(4727): d

Downgrading to the previous version temporarily let us edit the pages again.

Would anyone know know to resolve this error with the updated version of Coblocks? Thank you.

Activity

  1. EvanHerman commented on Jul 25, 2024

    @EvanHerman
    Contributor

    Hi @shirleybl,

    It sounds like your server may not have the proper extension installed that contains the DOMDocument class. If you are running Debian / Ubuntu you'll need to install the php-dom package.

    sudo apt-get install php-dom

    If you are running Centos / Fedora / Red Hat you'll need to install php-xml.

    yum install php-xml

    I came across a stackoverflow thread with a similar reported issue, and the comments indicate you'll need to install the necessary package.
    https://stackoverflow.com/questions/14395239/class-domdocument-not-found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions