hbstack / revision

HB revision module describe page with extra info, such as the created, modified dates and so on.
https://hbstack.dev/
MIT License
2 stars 2 forks source link

[v0.6.5] Error render of "page" failed #79

Closed gavlinski closed 3 months ago

gavlinski commented 3 months ago

Hi! After upgrading all modules with hugo mod get -u, I've noticed that revision v0.6.5 is breaking hugo server, that won't start any more. Downgrading revision to v0.6.4 fixes the problem. See the error messages below.

ERROR render of "page" failed: "/modules/modules/filecache/modules/pkg/mod/github.com/hbstack/blog@v0.37.0/layouts/blog/single.html:2:5": execute of template failed: template: blog/single.html:2:5: executing "main" at <partial "hb/modules/blog/single" .>: error calling partial: "/modules/modules/filecache/modules/pkg/mod/github.com/hbstack/blog@v0.37.0/layouts/partials/hb/modules/blog/single.html:53:12": execute of template failed: template: partials/hb/modules/blog/single.html:53:12: executing "partials/hb/modules/blog/single.html" at <partial "hugopress/functions/render-hooks" (dict "Name" "hb-blog-post-content-end" "Page" .)>: error calling partial: "/modules/modules/filecache/modules/pkg/mod/github.com/hugomods/hugopress@v0.5.0/layouts/partials/hugopress/functions/render-hooks.html:34:8": execute of template failed: template: partials/hugopress/functions/render-hooks.html:34:8: executing "partials/hugopress/functions/render-hooks.html" at <partial .partial $ctx>: error calling partial: "/modules/modules/filecache/modules/pkg/mod/github.com/hbstack/blog/modules/revision@v0.1.0/layouts/partials/hugopress/modules/hb-blog-revision/hooks/hb-blog-post-content-end.html:1:4": execute of template failed: template: partials/hugopress/modules/hb-blog-revision/hooks/hb-blog-post-content-end.html:1:4: executing "partials/hugopress/modules/hb-blog-revision/hooks/hb-blog-post-content-end.html" at <partial "hb/modules/revision/index" .Page>: error calling partial: "/modules/modules/filecache/modules/pkg/mod/github.com/hbstack/revision@v0.6.5/layouts/partials/hb/modules/revision/index.html:17:21": execute of template failed: template: partials/hb/modules/revision/index.html:17:21: executing "partials/hb/modules/revision/index.html" at <.IsContentAdapter>: can't evaluate field IsContentAdapter in type *source.File
ERROR render of "page" failed: "/modules/modules/filecache/modules/pkg/mod/github.com/hbstack/docs@v0.17.3/layouts/docs/single.html:24:13": execute of template failed: template: docs/single.html:24:13: executing "main" at <partial "hb/modules/docs/doc" .>: error calling partial: "/modules/modules/filecache/modules/pkg/mod/github.com/hbstack/docs@v0.17.3/layouts/partials/hb/modules/docs/doc.html:6:3": execute of template failed: template: partials/hb/modules/docs/doc.html:6:3: executing "partials/hb/modules/docs/doc.html" at <partial "hugopress/functions/render-hooks" (dict "Page" . "Name" "hb-docs-doc-content-end")>: error calling partial: "/modules/modules/filecache/modules/pkg/mod/github.com/hugomods/hugopress@v0.5.0/layouts/partials/hugopress/functions/render-hooks.html:34:8": execute of template failed: template: partials/hugopress/functions/render-hooks.html:34:8: executing "partials/hugopress/functions/render-hooks.html" at <partial .partial $ctx>: error calling partial: "/modules/modules/filecache/modules/pkg/mod/github.com/hbstack/docs/modules/revision@v0.1.0/layouts/partials/hugopress/modules/hb-docs-revision/hooks/hb-docs-doc-content-end.html:1:4": execute of template failed: template: partials/hugopress/modules/hb-docs-revision/hooks/hb-docs-doc-content-end.html:1:4: executing "partials/hugopress/modules/hb-docs-revision/hooks/hb-docs-doc-content-end.html" at <partial "hb/modules/revision/index" .Page>: error calling partial: "/modules/modules/filecache/modules/pkg/mod/github.com/hbstack/revision@v0.6.5/layouts/partials/hb/modules/revision/index.html:17:21": execute of template failed: template: partials/hb/modules/revision/index.html:17:21: executing "partials/hb/modules/revision/index.html" at <.IsContentAdapter>: can't evaluate field IsContentAdapter in type *source.File
ERROR render: failed to render pages: render of "page" failed: "/modules/modules/filecache/modules/pkg/mod/github.com/hbstack/blog@v0.37.0/layouts/blog/single.html:2:5": execute of template failed: template: blog/single.html:2:5: executing "main" at <partial "hb/modules/blog/single" .>: error calling partial: "/modules/modules/filecache/modules/pkg/mod/github.com/hbstack/blog@v0.37.0/layouts/partials/hb/modules/blog/single.html:53:12": execute of template failed: template: partials/hb/modules/blog/single.html:53:12: executing "partials/hb/modules/blog/single.html" at <partial "hugopress/functions/render-hooks" (dict "Name" "hb-blog-post-content-end" "Page" .)>: error calling partial: "/modules/modules/filecache/modules/pkg/mod/github.com/hugomods/hugopress@v0.5.0/layouts/partials/hugopress/functions/render-hooks.html:34:8": execute of template failed: template: partials/hugopress/functions/render-hooks.html:34:8: executing "partials/hugopress/functions/render-hooks.html" at <partial .partial $ctx>: error calling partial: "/modules/modules/filecache/modules/pkg/mod/github.com/hbstack/blog/modules/revision@v0.1.0/layouts/partials/hugopress/modules/hb-blog-revision/hooks/hb-blog-post-content-end.html:1:4": execute of template failed: template: partials/hugopress/modules/hb-blog-revision/hooks/hb-blog-post-content-end.html:1:4: executing "partials/hugopress/modules/hb-blog-revision/hooks/hb-blog-post-content-end.html" at <partial "hb/modules/revision/index" .Page>: error calling partial: "/modules/modules/filecache/modules/pkg/mod/github.com/hbstack/revision@v0.6.5/layouts/partials/hb/modules/revision/index.html:17:21": execute of template failed: template: partials/hb/modules/revision/index.html:17:21: executing "partials/hb/modules/revision/index.html" at <.IsContentAdapter>: can't evaluate field IsContentAdapter in type *source.File
razonyang commented 3 months ago

My apologies, it's a backwards compatibility issue, which calling newer methods in older Hugo version, should be fixed in github.com/hbstack/revision@v0.6.6.

gavlinski commented 3 months ago

Thanks! It's now working fine again. :smile: