Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1123446

    Hello. I’ve just became admin of a site that uses the Enfold theme (https://feedxl.com/). The main issue right now is that the theme has not been updated in over 2 years–it is running on theme version 4.0.5 :-( So in order to update it carefully, I have created a private dev site, and will first update the theme there, resolve any issues that may arise, then update the live site. But I’m unfortunately having an issue with this step. Here is my situation.

    The live site is running on Apache, with PHP version 5.6 (host: SiteGround). I have cloned the site to my local computer, which is running on nginx (Local by Flywheel), with PHP version 7.2.9. Both sites display and function without error. Now, I need to also clone the site to an online dev site, so my client can review the dev site for errors after I update the theme. To do so, I have created a VPS running on Apache (AWS Amazon Linux 2), with PHP version 7.2.19. This site has one big error, which seems to occur on only the home page. On that page, no page content displays. In the PHP error log is a fatal error, seemingly from an Enfold theme file (pertaining to layer slider).

    [31-Jul-2019 06:26:06 UTC] PHP Fatal error:  Uncaught Error: Class 'DOMDocument' not found in /var/www/html/wp-content/themes/enfold/config-layerslider/LayerSlider/helpers/phpQuery.php:262
    Stack trace:
    #0 /var/www/html/wp-content/themes/enfold/config-layerslider/LayerSlider/helpers/phpQuery.php(331): LayerSlider\PHPQuery\DOMDocumentWrapper->documentCreate('utf-8')
    #1 /var/www/html/wp-content/themes/enfold/config-layerslider/LayerSlider/helpers/phpQuery.php(673): LayerSlider\PHPQuery\DOMDocumentWrapper->loadMarkupHTML('<!DOCTYPE HTML ...')
    #2 /var/www/html/wp-content/themes/enfold/config-layerslider/LayerSlider/helpers/phpQuery.php(324): LayerSlider\PHPQuery\DOMDocumentWrapper->documentFragmentLoadMarkup(Object(LayerSlider\PHPQuery\DOMDocumentWrapper), 'UTF-8', '<h1>')
    #3 /var/www/html/wp-content/themes/enfold/config-layerslider/LayerSlider/helpers/phpQuery.php(225): LayerSlider\PHPQuery\DOMDocumentWrapper->loadMarkupHTML('<h1>', '')
    #4 /var/www/html/wp-content/themes/enfold/config-layerslider/LayerSlider/helpers/phpQuery.php(198): LayerSlider\PHPQuery\D in /var/www/html/wp-content/themes/enfold/config-layerslider/LayerSlider/helpers/phpQuery.php on line 262

    The fact that the error is in a file named phpQuery.php, as well as the fact that neither my live site nor my local dev site possess this error, makes me think that maybe this error is due to a misconfiguration of my virtual server. Also, this is the first time I have configured and used a VPS, so I quite possible could have overlooked a step. Any thoughts on how I can troubleshoot that some more? Maybe I failed to enable a PHP module or something?
    I realize one of the first things you require of users is that they update the theme to the latest version. But that is indeed what I am trying to accomplish–I can’t update the theme until I resolve this fatal error.

    Does the Enfold theme have some king of ‘diagnostic’ checkup tool, in which you can check to see if my site has all the requires modules/settings enabled? When I run Dashboard–>Tools–>Site Health on my remote dev site, it indicates:

    Warning The optional module, bcmath, is not installed, or has been disabled.
    Warning The optional module, imagick, is not installed, or has been disabled.
    Error The required module, gd, is not installed, or has been disabled.

    When I run Site Health on my local dev site and live site, these entries are not present. Could one or more of these be the cause of my issue? GD seems to be an image-related module, and indeed Layer Slider is processing images on my site.

    If you want access to either of my online sites, I’m happy to give.

    Thanks.

    #1124004

    Hey FeedXL2019,

    Thank you for using Enfold.

    On a quick search, I found this thread that may be related to the error.

    // https://stackoverflow.com/questions/14395239/class-domdocument-not-found

    In the AWS command line, try this code

    sudo apt-get install php-dom
    

    That’s for Ubuntu or Debian, so I’m not sure if it’s going to work in Amazon Linux 2.

    Best regards,
    Ismael

    #1124072

    OK thanks. So is the DOM extension required for WordPress? Or required for the Enfold theme? Or Layer Slider?

    What about the fact that the GD extension is not installed, and WordPress Site Health indicates this is a required extension. Do you think that’s related to my issue?

    #1124503

    Hi FeedXL2019,

    Layer Slider does not process images, it just displays them and so there is no issue with GD, but it might come up later if you use some plugin that relies on it.

    php-dom is not required by Enfold, but is required by Layer Slider so you might want to have it installed.

    Best regards,
    Victoria

    #1124658

    OK thanks for that. I installed php-dom and that resolved my issue. To be safe, I also installed the GD extension. So we can consider this resolved, thanks.

    #1124715

    Hi,

    Great, I’m glad that you got it working and thanks for the update. I’ll go ahead and close this thread for now then, please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘PHP error: Uncaught Error: Class 'DOMDocument' not found’ is closed to new replies.