ahmedkaludi / accelerated-mobile-pages

Automatically add Accelerated Mobile Pages (AMP Project) functionality on your WordPress.
http://ampforwp.com
Other
176 stars 96 forks source link

PHP Fatal error: Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) #5614

Closed satriaenur closed 1 month ago

satriaenur commented 4 months ago

Amp page throwing 500 error, using version 1.0.96.1. Got here on error logs

[STDERR] PHP Fatal error:  Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /***/wp-content/plugins/amp-cta/amp-cta.php:741
Stack trace:
#0 /***/wp-content/plugins/amp-cta/amp-cta.php(741): DOMDocument->loadHTML('')
#1 [internal function]: amp_cta_set_utm('', 9)
#2 {main}
  thrown in /***/wp-content/plugins/amp-cta/amp-cta.php on line 741

[STDERR] PHP Fatal error:  Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /***/wp-content/plugins/amp-pagebuilder-compatibility/amp-pagebuilder-compatibility.php:298
Stack trace:
#0 /***/wp-content/plugins/amp-pagebuilder-compatibility/amp-pagebuilder-compatibility.php(298): DOMDocument->loadHTML('')
#1 /***/wp-includes/class-wp-hook.php(324): amp_pbc_ert_properties_slider('')
#2 /***/wp-includes/plugin.php(205): WP_Hook->apply_filters('', Array)
#3 /***/wp-content/plugins/accelerated-mobile-pages/includes/features/functions.php(314): apply_filters('ampforwp_the_co...', '')
#4 [internal function]: ampforwp_the_content_filter_full('', 2)
#5 /***/wp-content/themes/idchv3/functions.php(1073): ob_clean()
#6 /***/wp-includes/class-wp-hook.php(324): {closure}('')
#7 /***/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
#8 /***/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#9 /***/wp-includes/load.php(1270): do_action('shutdown')
#10 [internal function]: shutdown_action_hook()
#11 {main}
  thrown in /***/wp-content/plugins/amp-pagebuilder-compatibility/amp-pagebuilder-compatibility.php on line 298

I've treid to put things like

if (empty($content)) return $content;

before the error line, I got blank page instead for amp pages

Sanjeevsetu commented 3 months ago

Hi @satriaenur

Have you tried rollbacking the plugin?? Can you just once rollback and try if issue fixed or not ?

Sanjeevsetu commented 1 month ago

Hi @satriaenur

Are you still facing this issue ? Could you please contact us through https://ampforwp.com/support/#contact