Reply To: Plugin stay on "Loading"

Ernest Marcinko
Ernest Marcinko


The problem was caused by a custom script placed in the functions.php file in the theme folder:

add_filter( 'script_loader_tag', 'add_async', 10, 2 );
function add_async( $tag, $handle ) {
    return str_replace( ' src', ' async src', $tag );

I have de-activated the add_filter.. part, now it’s working again.

The datepicker core script was raising a fatal error because of the async script loading. Many scripts in wordpress are dependent on each other, and adding the “async” tag to the back-end scripts breaks this dependency, causing fatal errors in the javascript console. I’ve also noticed errors around the console on other back-end pages when the “async” tag was active. Now they are all gone.

I only advise using that code for the front-end scripts, but it may also cause dependency issues, be careful with it.

Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)