Hi @gicoprasico,
Thanks, for using our plugins.
It seems you’re using a caching plugin (Autoptimize, WP-rocket, etc) where the inline scripts are combined. Please ensure the “moove_frontend_gdpr_scripts” is excluded from this rule otherwise our plugin can’t check the dependencies and load the scripts properly.
Related topic: https://support.mooveagency.com/topic/moove_frontend_gdpr_scripts-is-not-defined/
Hope this helps
Hi, I have this same problem.
I use WP-rocket.
I have excluded the main.js.
But I have an error in the console that says:
main.js Uncaught ReferenceError: moove_frontend_gdpr_scripts is not defined
I’ve followed the steps in this tutorial and can’t get it to work. I have also read the attached link.
I use this on my platform and I think that is the problem. (Rel link here: https://wordpress.org/support/topic/add-preload-to-litty-css-to-improve-performance/)
add_action (‘gdpr_enqueue_lity_nojs’, ‘__return_false’);
add_action (‘gdpr_cc_prevent_ajax_script_inject’, ‘__return_true’)
Can you help me?
Hi,
I had the same ‘moove_frontend_gdpr_scripts is not defined’ error and found this page. I was using WP Rocket so removed the main.js script from caching but didn’t work. Even deactivating WP Rocket completely.
I managed to find the issue : it was related to the enqueue of jquery in my template. I had to change it and wasn’t using the proper way to do so. So for the GDPR plugin on line 501 of the class-moove-gdpr-actions.php file the code
wp_enqueue_script( 'moove_gdpr_frontend', plugins_url( basename( dirname( __FILE__ ) ) ) . '/dist/scripts/main.js', array( 'jquery' ), MOOVE_GDPR_VERSION, true );
couldn’t call the jquery file properly.
I changed it to wp_enqueue_script( 'moove_gdpr_frontend', plugins_url( basename( dirname( __FILE__ ) ) ) . '/dist/scripts/main.js', array(), MOOVE_GDPR_VERSION, true );
and now everything works fine. I know it’s not the right way but it may help people to find the issue !
Hi @ptitsuisse,
Thanks for your comments.
The fix will be included in our next version (will be released early next week).
Hope this helps.
Hello,
This has been fixed in our latest version. Please update the plugin and add this hook to your functions.php
add_filter('gdpr_main_script_depends_on', 'gdpr_main_script_depends_on');
function gdpr_main_script_depends_on( $deps ) {
return array();
}