Slider Revolution admin interface broken due to X Child

Regarding the following ticket.

We have disabled all plugins accept slider revolution the JavaScript errors persist. When we switch from X-Child to Twenty Twenty the JavaScript errors go away. We then switched to X Theme and the JavaScript error are gone. Then we switched back to X Child and the JavaScript errors returned.

Please help us fix the issues with X Child theme.

Micah

Hello Micah,

Thanks for writing in! Based on the information that you’ve shared, there is a particular code present in the child theme that is causing the issue. I have checked your child theme’s functions.php file and I am seeing this:

function addfooter_script() { ?>
<script type="text/javascript" src="//cdn.callrail.com/companies/301241961/1e2bd300cc3c387d10d5/12/swap.js"></script>
<?php
}
add_action('wp_footer','addfooter_script');



function _remove_script_version( $src ){
 $parts = explode( '?', $src );
 return $parts[0];
}
 
add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );

Try commenting this line one at a time to find out which one is causing the issue:

// add_action('wp_footer','addfooter_script');

or these lines:

// add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
// add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );

Kindly let us know how it goes.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.