-
Notifications
You must be signed in to change notification settings - Fork 134
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
WARN .File.Dir on zero object. #728
Comments
The error you mentioned is a warning and doesn't prevent anything from working. Not sure, what specifically doesn't work. Just tested this with your reproduction steps and adding a new background image works and reloads. What specific images aren't loading? Any code or config can share? The linked issue was a specific windows issue and seems to be an unfortunate issue with Hugo itself. |
@stp-ip Yes; I realized that after, now the theme works fine and as you said it's only a warning. However this warning seams to be wellknown from hugo community; not every theme have this error and some of them had it before and fixed it, but I'm unable to understand what they fixed. when I checked for .File.Dir in syna theme, it seams to be fine (from my non dev eye) maybe you will understand more than me https://discourse.gohugo.io/t/error-what-to-replace-file-dir-with-in-hugo-book/18118 |
This warning has cost us a lot of time to remove on each turn. We fix it and make sure it doesn't pop up and with no change, next update it appears again. And seriously it shouldn't appear as such a heart wrenching warning. It definitely is not a problematic issue, the Still, we'll try and figure out what part is throwing the error and wait for the next update that makes it pop again. Thanks for reporting it. If you find where the issue is, please let us know. |
This should be fixed in the latest version v0.17.0. Please reopen, if this comes up again. |
FYI, with the version = "0.17.1" it's still there
|
I cannot find the place that's causing the warning and lack the knowledge in Go to debug it from Hugo's side. |
What happened: this warning appear:
Building sites … WARN 2020/03/30 20:58:58 .File.Dir on zero object. Wrap it in if or with: {{ with .File }}{{ .Dir }}{{ end }}
Hi I try to use Syna with Hugo
I had the error before the last version, and still have it with the last version of Syna and Hugo extended.
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
install hugo extended on Ubuntu
or another way to reproduce it
or this way
The text was updated successfully, but these errors were encountered: