• Resolved useStrict

    (@usestrict)


    We’re seeing errors when trying to load https://stats.wp.com/s-<date&gt;.js.

    The URL being generated does look bad:

    <script async defer src='https://thedomain.com/wp-content/plugins/jetpack/https://stats.wp.com/s-202029.js'></script>

    I can replicate the generation of the bad URL by running wp eval-file against the following code:

    $filename = sprintf(
                'https://stats.wp.com/s-%d.js',
                gmdate( 'YW' )
            );
    var_dump(Automattic\Jetpack\Assets::get_file_url_for_environment( esc_url( $filename ), esc_url( $filename ) ) );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Bad stats.wp.com URL being generated’ is closed to new replies.