-
-
Notifications
You must be signed in to change notification settings - Fork 32
[BUG] Render of "page" failed #262
Comments
Hi @KHannibal, Can you send me the repository link to your blog? |
Hi @victor-pogor, You mean, you would like a copy of my website repository ? |
@KHannibal I just wanted to look in your blog repository to try to identify the root cause of this issue, but If your blog's source code is closed, it's ok, I'll try to find out without it. :) |
No problem @victor-pogor, I will send you that by email. Some data such as ID and other sensitive materials will be removed, obviously. ;) Thanks in advance ! |
@victor-pogor repository sent. Thanks a lot ! |
Hi @KHannibal, I was able to reproduce your issue. I analyzed your repository and the theme's code and I observed that the error persists when you have the
|
Wow, I did not even notice that. Thanks a lot !!! 👍 |
Describe the bug
When running the command
hugo
to build my websites, several errors appeared.ERROR 2021/08/12 07:37:53 render of "page" failed: execute of template failed: template: posts/single.html:107:12: executing "content" at <partial "single/footer.html" .>: error calling partial: "/Sites/blog/themes/CodeIT/layouts/partials/single/footer.html:54:32": execute of template failed: template: partials/single/footer.html:54:32: executing "partials/single/footer.html" at <partialCached "function/path.html" $value $value>: error calling partialCached: partial that returns a value needs a non-zero argument.
ERROR 2021/08/12 07:37:53 render of "page" failed: execute of template failed: template: posts/single.html:107:12: executing "content" at <partial "single/footer.html" .>: error calling partial: "/Sites/blog/themes/CodeIT/layouts/partials/single/footer.html:54:32": execute of template failed: template: partials/single/footer.html:54:32: executing "partials/single/footer.html" at <partialCached "function/path.html" $value $value>: error calling partialCached: partial that returns a value needs a non-zero argument.
ERROR 2021/08/12 07:37:53 render of "home" failed: execute of template failed: template: index.html:36:20: executing "content" at <.Render>: error calling Render: "/Sites/blog/content/posts/2016/test.md:69:32": failed to execute template ["summary"] v: "/Sites/blog/themes/CodeIT/layouts/_default/summary.html:69:32": execute of template failed: template: _default/summary.html:69:32: executing "_default/summary.html" at <partialCached "function/path.html" $value $value>: error calling partialCached: partial that returns a value needs a non-zero argument.
Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: posts/single.html:107:12: executing "content" at <partial "single/footer.html" .>: error calling partial: "/Sites/blog/themes/CodeIT/layouts/partials/single/footer.html:54:32": execute of template failed: template: partials/single/footer.html:54:32: executing "partials/single/footer.html" at <partialCached "function/path.html" $value $value>: error calling partialCached: partial that returns a value needs a non-zero argument.
What I did to fix the issue was to remove one
$value
in/layouts/_default/summary.html
, at 69:32 in order to get{{- $tag := partialCached "function/path.html" $value | printf "/tags/%v" | $.Site.GetPage -}}
instead of{{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}}
I did the same in
/layouts/partials/single/footer.html
at 54:32.Now my website builds properly.
Build Environment
Additional Information
Could my fix be the cause of this issue #212 ?
The text was updated successfully, but these errors were encountered: