When we first time enable the option: Locally cache tracking code file, we got the local js query string none:
/sites/default/files/google_analytics/analytics.js?

The D8 code should be change from

$query_string = '?' . \Drupal::state()->get('system.css_js_query_string') ?: '0';

to

$query_string = '?' . (\Drupal::state()->get('system.css_js_query_string') ?: '0');

Then it will be the same as the D7 version:

$query_string = '?' . variable_get('css_js_query_string', '0');
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jieyyal created an issue. See original summary.

Jieyyal’s picture

Here comes the patch.

hass’s picture

Status: Active » Needs work
Issue tags: +Needs tests
hass’s picture

I cannot repro this. How can system.css_js_query_string be empty?

hass’s picture

This show the problem:

$query_string = '?' . \Drupal::state()->get('system.css_js_query_stringAAA') ?: '0';
kint($query_string);
hass’s picture

Status: Needs work » Postponed (maintainer needs more info)

  • hass committed 0514539 on 8.x-2.x authored by jieyyal
    Issue #2876463 by jieyyal: Fix missing query string when
    system....
hass’s picture

Status: Postponed (maintainer needs more info) » Fixed
Issue tags: -Needs tests

No idea how to test.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.