-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Files replaced with same name + dimensions never regenerate #2
Comments
@josephlewisnz silverstripe image backend used to use the hash in all urls (even public image urls) but I believe in recent times the default has been changed to short urls sans-hash in the path for public images. If you can re-configure your asset backend to route public images with hash you'll probably resolve the above issue. It's all been rewritten since I have poked my head into the code (years ago haha), so unfortunately you may need to dig up and investigate the answer yourself. |
yeah this is the new parser
Reconfigure the public store to use this one instead and it'll probably fix it https://github.com/silverstripe/silverstripe-assets/blob/2/src/FilenameParsing/HashFileIDHelper.php
and config at https://github.com/silverstripe/silverstripe-assets/blob/2/_config/asset.yml#L29-L33 best of luck |
Thanks @tractorcow for the direction. I will update here if I make any progress! |
I've had an investigation and I believe this is due to the fact the variant remains the same and no hash check is done.
To Replicate
I will be investigating to see if there is a fix here, however, I also see a comment as to why the hash is not used, so maybe this is not possible and another approach is needed.
" * Stop caring about hash when checking for file collisions; This breaks many things.
* Specifically, the "original" image and the formatted image will have different hashes,
* but we cannot determine the formatted hash without generating it, or storing it somewhere. "
The text was updated successfully, but these errors were encountered: