Error: error building site: render: render of "404" failed:
Issue description
Hi, I am receiving the below error while trying to build my site. I used this theme in the past without any issue. But with the latest version, I am receiving the error. Can anyone please take a look?
go version go1.21.4 windows/amd64
Theme version
v2.7.4
Hugo version
hugo v0.120.4-f11bca5fec2ebb3a02727fb2a5cfb08da96fd9df+extended windows/amd64 BuildDate=2023-11-08T11:18:07Z VendorInfo=gohugoio
Which browser rendering engines are you seeing the problem on?
No response
URL to sample repository or website
No response
Hugo output or build error messages
Error: error building site: render: render of "404" failed: "...\layouts\_default\baseof.html:25:9": execute of template failed: template: 404.html:25:9: executing "404.html" at <partial $header .>: error calling partial: "...\layouts\partials\header\basic.html:5:9": execute of template failed: template: partials/header/basic.html:5:9: executing "partials/header/basic.html" at <partial "logo.html" .>: error calling partial: "...\layouts\partials\logo.html:30:22": execute of template failed: template: partials/logo.html:30:22: executing "partials/logo.html" at <markdownify>: error calling markdownify: runtime error: invalid memory address or nil pointer dereference
it will build the site, just not serve it for awhile, right?
is your site multi-language enabled?
i’ve seen this too, and I’m pretty sure it has something to do with the way I was manipulating variables and passing state around… I think there’s a race condition in 0.120 but idk for sure.
in MY case, I stopped hitting it every few minutes when I didn’t attempt to alter a variable in multiple partials, but instead passed a dict with the state ( ‘.’ ) but idk if that’s the cause;
is your code available someplace for review?
it will build the site, just not serve it for awhile, right?
No. The site is not built.
is your site multi-language enabled?
Yes. However, now that you have mentioned it, I have tested it with one language, and now it seems working.
i’ve seen this too, and I’m pretty sure it has something to do with the way I was manipulating variables and passing state around… I think there’s a race condition in 0.120 but idk for sure.
in MY case, I stopped hitting it every few minutes when I didn’t attempt to alter a variable in multiple partials, but instead passed a dict with the state ( ‘.’ ) but idk if that’s the cause;
I was not changing anything. Even just copying the site from repo and then running the command produces the error for me. Even the site I built with Congo one year ago produced the same error.
is your code available someplace for review?
If required, I can host it on github
Interesting, I haven't seen this error before. If you are able to put your project into a repo I can take a look and see if I can work out what the issue is.
I got a similar error, the problem was that my index page had draft = true. Changed it to draft = false and building worked.
I got a similar error, the problem was that my index page had
draft = true. Changed it todraft = falseand building worked.
@sardarms, is this your issue too?
I wonder if there's a way to catch this error, but I suspect if you're asking Hugo not to build your homepage by flagging it as a draft, then you should expect there to be a problem with the output.
This issue has been automatically marked as stale because it has not had any recent activity. If you are still experiencing this issue, please review the issue history and add a reply with any requested and/or additional information in order to keep the issue open. This issue will automatically close in 30 days if no further activity occurs.