Hi!
Thank you for the update.
In your installation, we noticed that the layerslider jquery script has this attribute, which does not exists in our own installation.
data-cfasync="false
This was added using a filter, so we used this snippet in the functions.php file to register the scripts again and remove the data attribute.
add_action("wp_enqueue_scripts", function() {
wp_deregister_script('layerslider' );
wp_deregister_script('layerslider-utils' );
wp_register_script('layerslider', LS_ROOT_URL.'/static/layerslider/js/layerslider.kreaturamedia.jquery.js', array('jquery'), LS_PLUGIN_VERSION, true );
wp_register_script('layerslider-utils', LS_ROOT_URL.'/static/layerslider/js/layerslider.utils.js', array('layerslider'), LS_PLUGIN_VERSION, true );
}, 999);
function avf_script_loader_tag_mod( $tag, $handle, $source ) {
if ( "layerslider" === $handle || "layerslider-utils" === $handle ) {
$tag = str_replace( "data-cfasync=\"false\"", '', $tag );
}
return $tag;
}
add_filter( 'script_loader_tag', 'avf_script_loader_tag_mod', 999, 3);
add_action("after_setup_theme", function() {
remove_filter('script_loader_tag', 'layerslider_script_attributes', 10, 3);
}, 999);
The jQuery errors are now gone, but the old sliders are still working properly. However, newly created sliders work just fine. Please check the private field.
Cheers!
Ismael