Hi @wikifa,
Thanks for using our plugins.
You are using Autoptimize, please try to add the following script as exclusion to Autoptimize: (Exclude scripts from Autoptimize:)
gdpr-cookie-compliance/dist/scripts/main.js
Hope this helps.
Thread Starter
wikifa
(@wikifa)
Hi,
thanks for helping.
We believe there is an incompatibility with the
“youtube embed plus pro” which also uses lity.
Only pro version has the bug.
Let us know if there is ANY way to fix this.
Hi @wikifa,
Thanks for your comments.
It seems the “Youtube Embed Plus Pro” includes an outdated Lity version (from 2016), our plugin uses the Lity lightbox too, but first it checks if any other theme or plugin already loaded the library, if not will be loaded from GDPR plugin folder.
To fix the issue, you can try to add the following snippet to your functions.php
function gdpr_lity_fix_assets() {
if ( function_exists( 'moove_gdpr_get_plugin_directory_url' ) ) :
wp_enqueue_script( 'gdpr/lity-js', moove_gdpr_get_plugin_directory_url() . '/dist/scripts/lity.js', array(), MOOVE_GDPR_VERSION, true );
wp_enqueue_style('gdpr/lity-css', moove_gdpr_get_plugin_directory_url() . '/dist/styles/lity.css', array(), MOOVE_GDPR_VERSION, 'all' );
endif;
}
add_action( 'wp_enqueue_scripts', 'gdpr_lity_fix_assets' );
Hope this helps.