-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
SmidgeHelper.RequiresCss doesnt work #143
Comments
using version 4.0.3 |
Sorry for the delay so this is for view based declarations only. Do you know if this works OOTB without custom config mods? In the test project this is working: |
Any updates on this? |
Hey @Shazwazza, I've just run into the same problem. Tried to reproduce in a simple setup but works fine, so unsure what the cause is so far. What I do know is that its trying to load the file from the cache e.g.: But the file is actually located at: Seems like its missing the filename when looking for the file. I'll keep you posted if I figure it out. |
What cache buster are you using? If it's the default, bump your version number and it should work. Sounds like you have changed things and haven't bumped your version number so it's loading old content. Also note view based declarations can be tricky if you are doing things in the wrong order (i.e. creating or adding to bundles in partial views but trying to render the dynamic bundle before they execute). |
Thanks Mate, Yeah, tried bumping the version, and yes it's called from a partial, but the Cachebusting is set in Appsettings.json as "AppDomain", however overriding it in code in dev as "TimestampCacheBuster" The whacky thing is that I'm running locally, so all my bundled CSS are being served individually, however after adding a js/css file without the bundling e.g.: It seems to be caching required files in both my project where its broken and the clean project, where it works. Just as an FYI: I have a custom pipeline to include a Dotless .less processor, so it's not the usual setup.
I'm a little stumped at whats different between the two projects :) |
FYI In Umbraco 11, the following change caused some CSS to appear but url doesnt appear Original code: changed to appsettings.json "smidge": { Url has no mention of Smidge datafolder nor version 4 but some obscure /sc/ path. Also my razor gave runtime errors when using the @Smidge tag helper - doesn't exist, so was forced to use SmidgeHelper |
I'm experiencing this exact issue as well, as what @John-Blair has mentioned. I'm using Umbraco |
If I try to use this in my view
SmidgeHelper.RequiresCss(new CssFile("~/css/site.css"));
and later@await SmidgeHelper.CssHereAsync()
it generates a url to a file that doesnt exist:
The folder is created correctly in the cache folder (and it contains the right file):
but it seems it never gets compressed, and thus cannot serve it.
Config:
The text was updated successfully, but these errors were encountered: