bnomei / kirby3-fingerprint

File Method and css/js helper to add hash to files
https://forum.getkirby.com/t/kirby-3-fingerprint-asset-cachebuster/23576
MIT License
37 stars 3 forks source link

Fatal error when calling Bnomei\Fingerprint::css in 2.3.1 version #6

Closed seb-celinedesign closed 5 years ago

seb-celinedesign commented 5 years ago

i just updated Kirby in 3.0.1 and fingerprint in 2.3.1 version and i've the following issue when calling : Bnomei\Fingerprint::css('css/main.css')

Error thrown with message "Call to a member function version() on null"

Stacktrace:
#13 Error in vendor/bnomei/kirby3-fingerprint/classes/Fingerprint.php:67
#12 Bnomei\Fingerprint:process in vendor/bnomei/kirby3-fingerprint/classes/Fingerprint.php:17
#11 Bnomei\Fingerprint:css in site/snippets/head.php:13
#10 require in kirby/src/Toolkit/Tpl.php:39
#9 Kirby\Toolkit\Tpl:load in kirby/config/components.php:80
#8 Kirby\Cms\App:{closure} in kirby/src/Cms/App.php:1066
#7 Kirby\Cms\App:snippet in kirby/config/helpers.php:625
#6 snippet in site/templates/home.php:1
#5 require in kirby/src/Toolkit/Tpl.php:39
#4 Kirby\Toolkit\Tpl:load in kirby/src/Cms/Template.php:164
#3 Kirby\Cms\Template:render in kirby/src/Cms/Page.php:1115
#2 Kirby\Cms\Page:render in kirby/src/Cms/App.php:518
#1 Kirby\Cms\App:io in kirby/src/Cms/App.php:775
#0 Kirby\Cms\App:render in public/index.php:18
bnomei commented 5 years ago

i will take a look later today. thanks for reporting. have you tried removing the cache file the plugin creates?

seb-celinedesign commented 5 years ago

Well done ! I've just removed the storage/cache/bnomei folder and it works. Thx