Title: Error &#8211; document.getElementById(&#8230;) is null
Last modified: March 22, 2023

---

# Error – document.getElementById(…) is null

 *  Resolved [fixait](https://wordpress.org/support/users/fixait/)
 * (@fixait)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error-document-getelementbyid-is-null/)
 * I have a small project with woocommerce. Sometimes on product page website have
   error in javascript. Conosle log this:
 *     ```wp-block-code
       TypeError: document.getElementById(...) is null
           f https://topvitaminy.cz/wp-content/plugins/cookie-law-info/lite/frontend/js/script.min.js?ver=3.0.8:1
           f https://topvitaminy.cz/wp-content/plugins/cookie-law-info/lite/frontend/js/script.min.js?ver=3.0.8:1
           g https://topvitaminy.cz/wp-content/plugins/cookie-law-info/lite/frontend/js/script.min.js?ver=3.0.8:1
           p https://topvitaminy.cz/wp-content/plugins/cookie-law-info/lite/frontend/js/script.min.js?ver=3.0.8:1
       ```
   
 * It is problem in your plugin? or another else?
   ThxMichal

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Support [CookieYes Team](https://wordpress.org/support/users/cookieyesteam/)
 * (@cookieyesteam)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error-document-getelementbyid-is-null/#post-16586701)
 * Hi [@fixait](https://wordpress.org/support/users/fixait/),
   Greetings from CookieYes!
   We were unable to reproduce the error you reported on your site. Could you kindly
   provide us with the steps you took that led to the error so that we can investigate
   the issue more thoroughly?
 *  Thread Starter [fixait](https://wordpress.org/support/users/fixait/)
 * (@fixait)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error-document-getelementbyid-is-null/#post-16586873)
 * Thank you for your message. The error appears sporadically. 5-10 products need
   to be opened. For some, the image doesn’t load properly (JS is used on it, so
   it can be identified by it). If you reload the page, the error will disappear.
   I deactivated the cache plugin (originally I thought it was causing the error).
   Thanks
 *  Plugin Support [CookieYes Team](https://wordpress.org/support/users/cookieyesteam/)
 * (@cookieyesteam)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error-document-getelementbyid-is-null/#post-16600807)
 * Hi [@fixait](https://wordpress.org/support/users/fixait/),
   We were not able to
   reproduce this error. Will you be able to share a screen recording of it so that
   we can understand the exact steps to reproduce it and provide a more accurate
   solution.
 *  Plugin Support [CookieYes Team](https://wordpress.org/support/users/cookieyesteam/)
 * (@cookieyesteam)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error-document-getelementbyid-is-null/#post-16621766)
 * Hi [@fixait](https://wordpress.org/support/users/fixait/),
 * This thread has been inactive for a bit, so we are going to mark it as resolved
   now. Please feel free to open a new thread or follow up if you have any further
   questions or still need help.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Error – document.getElementById(…) is null’ is closed to new replies.

 * ![](https://ps.w.org/cookie-law-info/assets/icon.svg?rev=3007243)
 * [CookieYes – Cookie Banner for Cookie Consent (Easy to setup GDPR/CCPA Compliant Cookie Notice)](https://wordpress.org/plugins/cookie-law-info/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookie-law-info/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookie-law-info/)
 * [Active Topics](https://wordpress.org/support/plugin/cookie-law-info/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookie-law-info/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookie-law-info/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [CookieYes Team](https://wordpress.org/support/users/cookieyesteam/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/error-document-getelementbyid-is-null/#post-16621766)
 * Status: resolved