Home Forums Pro Themes Profitmag Pro Javascript Warnings


Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #20017

    Hello, I have this kind of warnings on my website. Please inform me how can I fix this kind of warnings. It comes from profitmag-pro/js/ folder. Also here is my website http://microphone-expert.com
    jquery.mCustomScrollbar.min.js?ver=1.0.0&nocache=1:1 A Parser-blocking, cross-origin script, http://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.0.6/jquery.mousewheel.min.js, is invoked via document.write. This may be blocked by the browser if the device has poor network connectivity.


    Hello @Arman

    This is noted down as a known issue. Which will be fix in upcoming updates as soon as possible.

    The error due to minified version of one of the js so to remove that error for now you need to remove that minified version of js and add unminified version.

    To do that first you need to create and activate child theme.
    You can create child theme manually taking help with the following link:


    Or you can take help of some plugin. Below is the link for one of them.


    After that all you need to add below code in child theme’s functions.php file.

    function profitmag_dequeue_error_scripts() {
    	wp_dequeue_script( 'profitmag-pro-scrolljs', get_template_directory_uri() . '/js/jquery.mCustomScrollbar.min.js', array('jquery'), '1.0.0', true  );
    add_action( 'wp_print_scripts', 'profitmag_dequeue_error_scripts' );
    function profitmag_enqueue_unminified_scripts() {
        wp_enqueue_script( 'profitmag-pro-scrolljs-unminified', get_template_directory_uri() . '/js/jquery.mCustomScrollbar.js', array('jquery'), '1.0.0', true );
    add_action( 'wp_enqueue_scripts', 'profitmag_enqueue_unminified_scripts' );

    Hope this will help to resolve your issue.

    Best Regards!!!


    I’am sorry but this doe not helped. after adding this code there is a disclaimer – Unexpected “}”


    Parse error: syntax error, unexpected ‘}’ in /home/content/a2pnexwpnas02_data03/20/3288820/html/wp-content/themes/profitmag-pro-child/functions.php on line 22


    Hello @Arman,

    We have tested the code in our side and the code is working fine.

    Please make sure that you have created the child theme properly and have properly copied ALL of the code given above.

    Also make sure that you have added the code in the child-theme’s functions.php file at the end of the file without removing any of the code lines already present in the file.

    Please write back to us if the issue persists even after following all the instructions.

    Best Regards !!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.