Droggol / OdooDebug

Browser extension for quick Odoo debug
https://www.droggol.com/odoo-tools
GNU General Public License v3.0
45 stars 23 forks source link

Plugin bug when using Cookiebot #11

Open o-diatlenko opened 3 years ago

o-diatlenko commented 3 years ago

Due to GDPR, I'm using a Сookiebot (https://www.cookiebot.com/).

And I noticed the strange behavior of the Odoo website top menu. I mean the default panel with a Sign-in button, Home button, Contact Us button.

When the OdooDebug plugin is installed and the user sees the Cookibot consent window, the menu disappears.

I did some research and it turned out that the problem is here:

// contentScript.js
...
scriptEl.onload = () => scriptEl.parentNode.removeChild(scriptEl);

The script removing breaks the loading of other scripts. Same result if I change the src of the script. Also, adding the defer argument doesn't help (by default, the dynamic script is async).

The only way to fix this (so far) is not to delete the script.

Thanks.