Problem/Motivation
Once upon a time we used to call drupal_flush_all_caches() at the end of the installer. This resulted in _drupal_flush_css_js() being called that sets the dummy query string added to all CSS and JavaScript files.
Potentially if you browser has cached a older version of the CSS because the query string is not during an install you could end up with an old dated version of a CSS or JS file.
Also some tests expect this to be set because we (unnecessarily) call drupal_flush_all_caches() during BrowserTestBase site installation - see #2189411: Remove an unnecessary container rebuild from FunctionalTestSetupTrait
Steps to reproduce
Install Drupal - and you'll see hrefs like /core/assets/vendor/normalize-css/normalize.css?0
. If you flush caches then these will change to something like /core/assets/vendor/normalize-css/normalize.css?qr9lk0
.
Proposed resolution
Ensure that the state value is set by the installer.
Remaining tasks
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#12 | 3207893-12.patch | 1.96 KB | Spokje |
#12 | interdiff_2_12.txt | 676 bytes | Spokje |
#2 | 3207893-2.patch | 1.19 KB | alexpott |
Comments
Comment #2
alexpottComment #4
larowlanLooks good to me
Comment #6
catchCommitted/pushed to 9.2.x and cherry-picked to 9.1.x, thanks!
Comment #8
larowlanWe had a race here between #2189411: Remove an unnecessary container rebuild from FunctionalTestSetupTrait and this.
It looks like #2189411: Remove an unnecessary container rebuild from FunctionalTestSetupTrait got in first, so we can probably remove the extra call to
_drupal_flush_css_js
inFunctionalTestSetupTrait
as well as the @todo that links here - follow up or should we just reuse this issue?Comment #9
catchI've rolled back the commit from this issue so we can commit the single change here - will be easier to track in git history later on.
Comment #12
SpokjeComment #13
SpokjeLet's see if this ends the race.
* prepares to wave chequered flag *
Comment #14
Spokje* Drops flag on floor, checks and sees that #2189411: Remove an unnecessary container rebuild from FunctionalTestSetupTrait never made it into
9.1.x
*.So for:
9.1.x
: Patch #29.2.x
: Patch#12Comment #15
SpokjeComment #16
longwaveLooks good to me!
Comment #17
SpokjeChanging version to
9.2.x-dev
in the hope that will trigger a two daily test rerun of patch #12.Edit: No dice :/
Comment #20
catchOK, committed the respective patches to the respective branches, thanks everyone!