Solved:
Edit /wp-content/plugins/jetpack/_inc/build/widgets/eu-cookie-law/eu-cookie-law.min.js
Column 1391
Replace:
n.parentNode.removeChild(n)
With:
try {n.parentNode.removeChild(n)} catch (error) {}
Hi there,
Can you please expand a bit on the steps to replicate this issue? I don’t understand exactly what you described above.
Alternatively, as you’ve already figured out how to fix it, do you want to open an issue and submit a pull request for this on GitHub directly?
https://github.com/automattic/jetpack
Hi there,
How to replicate:
Open WordPress Admin Dashboard.
Go to Appearance > Widgets.
Add Cookies & Consents Banner (Jetpack) to your primary sidebar.
Set Capture consent & hide the banner to After this amount of time 30 seconds.
Save.
Visit your WP page (maybe using an European VPN?).
The Cookies and Consent banner shows up, click Agree.
Open your browser DevTool, check Console outputs. No errors.
Press F5 (Refresh).
The widget knows you already consent, so it don’t display the banner again. But.
After 30 seconds, the timer script is still active to destroy/remove the banner even if the script never created the banner this time, it fails to find the banner (n.parentNode = null) and throws this error (Cannot read property ‘removeChild’ of null).
I can open the issue ans commit suggestion on github, no problems.
I can open the issue ans commit suggestion on github, no problems.
That would be great, our developers would be able to check this directly.
https://github.com/Automattic/jetpack/issues
Feel free to link the issue you create in the reply. Thanks!