Title: Getting PHP Error for DOMDocument::loadHTML()
Last modified: August 8, 2023

---

# Getting PHP Error for DOMDocument::loadHTML()

 *  [YouTech](https://wordpress.org/support/users/youtechians/)
 * (@youtechians)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/getting-php-error-for-domdocumentloadhtml/)
 * Query Monitor giving 100+ PHP Error on amp page ; Warning related to DOMDocument::
   loadHTML(): on wp-content/plugins/accelerated-mobile-pages/templates/features.
   php:8632
 * Here is one of them:
 * WarningDOMDocument::loadHTML(): Tag amp-auto-ads invalid in Entity, line: 15
    1.  wp-content/plugins/accelerated-mobile-pages/templates/features.php:8632
    2.  `DOMDocument->loadHTML()`
        wp-content/plugins/accelerated-mobile-pages/templates/
        features.php:8632
    3.  `ampforwp_include_required_scripts()`
        wp-includes/class-wp-hook.php:308
    4.  `apply_filters('ampforwp_the_content_last_filter')`
        wp-content/plugins/accelerated-
        mobile-pages/includes/features/functions.php:314
    5.  `ampforwp_the_content_filter_full()`
        wp-content/plugins/accelerated-mobile-
        pages/includes/features/functions.php:314
    6.  `ob_end_flush()`
        wp-includes/functions.php:5309
    7.  `wp_ob_end_flush_all()`
        wp-includes/class-wp-hook.php:308
    8.  `do_action('shutdown')`
        wp-includes/load.php:1144
    9.  `shutdown_action_hook()`
        wp-includes/load.php:1144
 * 1Plugin: accelerated-mobile-p
 * Image Link: [https://drive.google.com/file/d/1jkKS-HFrRd0JLOtkDJkyWD4yRsOzyGy4/view](https://drive.google.com/file/d/1jkKS-HFrRd0JLOtkDJkyWD4yRsOzyGy4/view)
 * AMP Version: 1.0.87
 * PHP: 8.2.8
    -  This topic was modified 2 years, 8 months ago by [YouTech](https://wordpress.org/support/users/youtechians/).
    -  This topic was modified 2 years, 8 months ago by [YouTech](https://wordpress.org/support/users/youtechians/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Ahmed Kaludi](https://wordpress.org/support/users/ahmedkaludi/)
 * (@ahmedkaludi)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/getting-php-error-for-domdocumentloadhtml/#post-16959006)
 * Hi, thank you for getting in touch with us. Could you kindly provide a file of
   your settings? Additionally, please provide a detailed description of where exactly
   you are encountering this issue. If possible, sharing a short reference video
   that highlights the issue would be greatly appreciated.

Viewing 1 replies (of 1 total)

The topic ‘Getting PHP Error for DOMDocument::loadHTML()’ is closed to new replies.

 * ![](https://ps.w.org/accelerated-mobile-pages/assets/icon-256x256.png?rev=1693616)
 * [AMP for WP - Accelerated Mobile Pages](https://wordpress.org/plugins/accelerated-mobile-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/accelerated-mobile-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/accelerated-mobile-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/accelerated-mobile-pages/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Ahmed Kaludi](https://wordpress.org/support/users/ahmedkaludi/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/getting-php-error-for-domdocumentloadhtml/#post-16959006)
 * Status: not resolved