This issue occurs when I try to edit or create a new page/post while GP is activated, or when I try to edit a page with elementor (also when GP is activated). I tried deactivating all the plugins and the error persisted, it only was solved when I changed the theme so that is why I think that is a GP issue.
Hope that someone can help me, thank you for your time!
Thanks for your quick response. Yes, I made a few modifications on the header and footer files to include the PD Cookie Consent javascript library, but I tried removing those lines and the error still persisted. Didn’t touch any functions.php file from the theme, I just added a few lines with <script> and <link> tags for the Cookie Consent.
If you can restore the GP Theme to its original state, by simply deleting and re-installing the theme ( you’re settings will be saved ) – to make sure those changes haven’t caused an issue.
Then for adding codes to the header you can use the Hook Element to add scripts to wp_head hook: