• Resolved goldcresthypno

    (@goldcresthypno)


    Hi

    When I run a speed test I am receiving an 404 error for the following file:

    https:/stats.wp.com/s-202024.js

    Any idea how to fix this?

    Thanks

    Lee

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support KokkieH

    (@kokkieh)

    Hi Lee,

    This is a bug that was introduced in Jetpack 8.6. This should be fixed in Jetpack 8.7 which is scheduled for the beginning of July. Until then, you should be able to fix the issue on your site by adding the following snippet to a functionality plugin on your site:

    /**
     * Fix the path of Woo script.
     *
     * @param string $url The URL to the file.
     * @param string $min_path The minified path.
     * @param string $non_min_path The non-minified path.
     */
    function jetpackcom_fix_woo_script_path( $url, $min_path, $non_min_path ) {
    	if ( wp_startswith( $min_path, 'https://stats.wp.com/s-' ) ) {
    		return $min_path;
    	}
    
    	return $url;
    }
    add_filter( 'jetpack_get_file_for_environment', 'jetpackcom_fix_woo_script_path', 10, 3 );

    You can follow the instructions here to add code snippets like the one above to your site:
    https://jetpack.com/support/adding-code-snippets/

    You can subscribe to the thread at https://ww.wp.xz.cn/support/topic/404-pages-found-at-gtmetrix/ for further updates on this issue.

    Thread Starter goldcresthypno

    (@goldcresthypno)

    Thanks I will give this a try.
    Lee

    Plugin Support Velda

    (@supernovia)

    @goldcresthypno Let us know if you need more help on this, or if you’re all set for now.

    Thread Starter goldcresthypno

    (@goldcresthypno)

    Hi

    I added the code and all is now fixed!

    Thanks very much

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Jetpack 404 stats.wp.com error’ is closed to new replies.