Archived topic
Js file missing
3 replies · Started by Marco on August 27, 2021
Hi I have an error message in the browser console en each page of a site.
GET (complete URL to a GP js file) net::ERR_ABORTED 404
Any idea on what could be?
Hi there,
Any chance you can disable all plugins except GP Premium to eliminate conflicts from other plugins first?
Let me know :)
I've done it, and it seems the problem is a conflict with Advanced Scripts. With one script only, actually.
This is the script:
add_action( 'wp_enqueue_scripts', 'custom_enqueue_files' );
function custom_enqueue_files() {
wp_enqueue_script( 'myscript', get_template_directory_uri() . '/js/script.js', array('jquery') );
wp_enqueue_style( 'glightbox-css', get_site_url() . '/custom-assets/css/glightbox.min.css' );
wp_enqueue_script( 'glightbox-js', get_site_url() . '/custom-assets/js/glightbox.min.js', '','', true );
}
add_action( 'wp_enqueue_scripts', 'mtw_theme_styles', 999 );
function mtw_theme_styles() {
wp_enqueue_style( 'dashicons' );
}
Actually, the problem is with the jQuery enqueue, that I have there because the Glightbox script doesn't work without it.
Glad to hear :)