schnti / kirby3-cachebuster

11 stars 5 forks source link

Doesn't work with automatic integrations #8

Open MaluNoPeleke opened 3 years ago

MaluNoPeleke commented 3 years ago

If you are on the 'blog' page and have a 'assets/css/templates/blog.css' file Kirby automatically loads it additionally to the other files that are explicitly written in the code. While Cachebuster works with the css() helper it doesn't work with those automatic files and the output URL then is looking like this: https://domain.tld/kirbytest/assets/css/templates/blog..css

moevbiz commented 2 years ago

ran into a similar issue this morning when a plugin asset wasn't generated yet, so it did not have a modified time. Possible fix: fallback to using time() to build the string if F::modified($file) returns nothing, or simply return the plain $url. What fixed it in my case was disabling cachebuster until the file was generated and existed in the media folder, then enabling it again

apps4research commented 1 year ago

I have the same problem, using the latest version of Kirby 3 (3.9). @meovbiz solution didn't work for me.