Support » Plugin: AMP for WP - Accelerated Mobile Pages » Php Warning in new update

  • Hi Team, I’m seeing the following error often on the server log. Can you take a look?

    PHP Fatal error: Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /home/catholicgallery.org/public_html/wp-content/plugins/accelerated-mobile-pages/templates/features.php:8269

    Please help me to fix this error.
    My site is on OpenLiteSpeed web server and uses PHP 8.0.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    But we already have this code – @$comp_dom->loadHTML($content);

    Thread Starter praderj

    (@praderj)

    For some reason it still throws this error.

    [354557] #catholicgallery.org] [STDERR] PHP Fatal error: Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /home/catholicgallery.org/public_html/wp-content/plugins/accelerated-mobile-pages/templates/features.php:8269
    Stack trace:
    #0 /home/catholicgallery.org/public_html/wp-content/plugins/accelerated-mobile-pages/templates/features.php(8269): DOMDocument->loadHTML()
    #1 /home/catholicgallery.org/public_html/wp-includes/class-wp-hook.php(292): ampforwp_remove_duplicate_canonical()
    #2 /home/catholicgallery.org/public_html/wp-includes/plugin.php(212): WP_Hook->apply_filters()
    #3 /home/catholicgallery.org/public_html/wp-content/plugins/accelerated-mobile-pages/includes/features/functions.php(252): apply_filters()
    #4 [internal function]: ampforwp_the_content_filter_full()
    #5 /home/catholicgallery.org/public_html/wp-includes/functions.php(4757): ob_end_flush()
    #6 /home/catholicgallery.org/public_html/wp-includes/class-wp-hook.php(292): wp_ob_end_flush_all()
    #7 /home/catholicgallery.org/public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters()
    #8 /home/catholicgallery.org/public_html/wp-includes/plugin.php(484): WP_Hook->do_action()
    #9 /home/catholicgallery.org/public_html/wp-includes/load.php(1072): do_action()
    #10 [internal function]: shutdown_action_hook()
    #11 {main}

    thrown in /home/catholicgallery.org/public_html/wp-content/plugins/accelerated-mobile-pages/templates/features.php on line 8269

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    We are checking and we will get back to you.

    This error is still present. But now it’s line 8257

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Can you please help us to re-create this on our end? Please share a short video, So that we will do the same and get back to you with a solution.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.