Bixal / bixal-site-drupal

Bixal drupal site
https://www.bixal.com
0 stars 0 forks source link

BSD fixes #266: Fix stale CSS by removing static version number from libraries. #267

Closed mattsqd closed 3 months ago

mattsqd commented 3 months ago

Make a change to like global.sass, run lando rebuild -y, the included aggregated CSS file that contains the change should have a new 'include' $_GET variable when looking at the source.

buddy-harlow commented 3 months ago

@mattsqd Tested again this morning and it's having the same issue where the include does no change, but the filename does.

Here is the outcome:

<link rel="stylesheet" media="all" href="[/sites/default/files/css/css_aT6wQD6YOFjm_k3WaQkzsE0fQpX4gWAYlW2z0yYV4ns.css?delta=0&amp;language=en&amp;theme=bixal_uswds&amp;include=eJxLyqxIzIkvLS5PKdZPz8lPSswBAEXnB0Y](http://bixalcom.lndo.site/sites/default/files/css/css_aT6wQD6YOFjm_k3WaQkzsE0fQpX4gWAYlW2z0yYV4ns.css?delta=0&language=en&theme=bixal_uswds&include=eJxLyqxIzIkvLS5PKdZPz8lPSswBAEXnB0Y)" />
<link rel="stylesheet" media="all" href="[/sites/default/files/css/css_LcKH-95XbUMNhldDAEstAT_7bvIYjLtb19e4O2tkqz4.css?delta=0&amp;language=en&amp;theme=bixal_uswds&amp;include=eJxLyqxIzIkvLS5PKdZPz8lPSswBAEXnB0Y](http://bixalcom.lndo.site/sites/default/files/css/css_LcKH-95XbUMNhldDAEstAT_7bvIYjLtb19e4O2tkqz4.css?delta=0&language=en&theme=bixal_uswds&include=eJxLyqxIzIkvLS5PKdZPz8lPSswBAEXnB0Y)" />
mattsqd commented 3 months ago

@mattsqd Tested again this morning and it's having the same issue where the include does no change, but the filename does.

Here is the outcome:

<link rel="stylesheet" media="all" href="[/sites/default/files/css/css_aT6wQD6YOFjm_k3WaQkzsE0fQpX4gWAYlW2z0yYV4ns.css?delta=0&amp;language=en&amp;theme=bixal_uswds&amp;include=eJxLyqxIzIkvLS5PKdZPz8lPSswBAEXnB0Y](http://bixalcom.lndo.site/sites/default/files/css/css_aT6wQD6YOFjm_k3WaQkzsE0fQpX4gWAYlW2z0yYV4ns.css?delta=0&language=en&theme=bixal_uswds&include=eJxLyqxIzIkvLS5PKdZPz8lPSswBAEXnB0Y)" />
<link rel="stylesheet" media="all" href="[/sites/default/files/css/css_LcKH-95XbUMNhldDAEstAT_7bvIYjLtb19e4O2tkqz4.css?delta=0&amp;language=en&amp;theme=bixal_uswds&amp;include=eJxLyqxIzIkvLS5PKdZPz8lPSswBAEXnB0Y](http://bixalcom.lndo.site/sites/default/files/css/css_LcKH-95XbUMNhldDAEstAT_7bvIYjLtb19e4O2tkqz4.css?delta=0&language=en&theme=bixal_uswds&include=eJxLyqxIzIkvLS5PKdZPz8lPSswBAEXnB0Y)" />

I was confused on the portions of the aggregated CSS url. Include will not change, it is simply the names of all the libraries included in the aggregated file: image image The hash is the second is the file name (CSS_[HERES_THEHASH]) image And here is the generate hash function where you can see it hashes the file contents to create the hash string image So long story short, my testing steps were wrong: include should stay the same, the portion after `css` in the actual file name should change.

buddy-harlow commented 3 months ago

Ahh if that's the case and the hash should change where you said, then my results were expected and this is good to go