• Resolved turtle0114

    (@turtle0114)


    This is the message shown on my screeen

    Call to a member function replaceChild() on null (0) [Error]
    /var/www/vhosts/cbseanswers.com/theinclouder.in/wp-content/plugins/amp/includes/sanitizers/class-amp-img-sanitizer.php:117
    
    #0 /var/www/vhosts/cbseanswers.com/theinclouder.in/wp-content/plugins/amp/includes/sanitizers/class-amp-img-sanitizer.php(129): AMP_Img_Sanitizer->process_picture_elements()
    #1 /var/www/vhosts/cbseanswers.com/theinclouder.in/wp-content/plugins/amp/includes/templates/class-amp-content-sanitizer.php(147): AMP_Img_Sanitizer->sanitize()
    #2 /var/www/vhosts/cbseanswers.com/theinclouder.in/wp-content/plugins/amp/includes/class-amp-theme-support.php(2032): AMP_Content_Sanitizer::sanitize_document()
    #3 /var/www/vhosts/cbseanswers.com/theinclouder.in/wp-content/plugins/amp/includes/class-amp-theme-support.php(1750): AMP_Theme_Support::prepare_response()
    #4 [internal function]: AMP_Theme_Support::finish_output_buffering()
    #5 /var/www/vhosts/cbseanswers.com/theinclouder.in/wp-includes/functions.php(5279): ob_end_flush()
    #6 /var/www/vhosts/cbseanswers.com/theinclouder.in/wp-includes/class-wp-hook.php(308): wp_ob_end_flush_all()
    #7 /var/www/vhosts/cbseanswers.com/theinclouder.in/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #8 /var/www/vhosts/cbseanswers.com/theinclouder.in/wp-includes/plugin.php(517): WP_Hook->do_action()
    #9 /var/www/vhosts/cbseanswers.com/theinclouder.in/wp-includes/load.php(1124): do_action()
    #10 [internal function]: shutdown_action_hook()
    #11 {main}

    what can be done for this any help will be amazing

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Milind More

    (@milindmore22)

    Thank you for contacting us, it seems you are using a invalid <picture>element on your site which is resulting in above fatal error.

    Your picture element for Author photo looks like below

    <picture>
      <source type="image/webp" data-srcset="https://www.ofuxico.com.br/wp-content/uploads/2022/08/autor-vini.jpg.webp">
      <img style="max-width: 80px;" data-eio="p" src="https://www.ofuxico.com.br/wp-content/uploads/2022/08/autor-vini.jpg" decoding="async" class="lazyload">
      <noscript>
        <img decoding="async" src="https://www.ofuxico.com.br/wp-content/uploads/2022/08/autor-vini.jpg" style="max-width: 80px;" data-eio="l">
      </noscript>
    </picture>
    1. the <source> doesn’t have srcset instead, it has data-srcset which is not valid.

    2. <noscript> is not allowed as child of <picture> element also we found duplicate <img> as child of <noscript> which might be the reason for the fatal error as AMP plugin is trying to replicate picture element with <amp-img> tag but since it found two child <img> tag creating a fatal error.

    Please replace the <picture> tag with following

    <picture>
      <source type="image/webp" srcset="https://www.ofuxico.com.br/wp-content/uploads/2022/08/autor-vini.jpg.webp">
      <img style="max-width: 80px;" data-eio="p" src="https://www.ofuxico.com.br/wp-content/uploads/2022/08/autor-vini.jpg" decoding="async" class="lazyload">
    </picture>

    it should fix your issue.

    Thread Starter turtle0114

    (@turtle0114)

    i am unable to locate that and have no idea how to remove it

    Thread Starter turtle0114

    (@turtle0114)

    and its happning on every AMP page even those who dosent have <picture> tag

    Plugin Support Milind More

    (@milindmore22)

    Hello @turtle0114

    Can you Please send us your site health info by visiting AMP->Support

    Plugin Support Milind More

    (@milindmore22)

    @turtle0114 As we didn’t receive a response I’ll mark this as resolved. Feel free to open a?new support topic?if you require any further assistance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error (replaceChild() on null)’ is closed to new replies.