Skip to content
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

Paginator error #174

Closed
deining opened this issue Mar 7, 2024 · 3 comments
Closed

Paginator error #174

deining opened this issue Mar 7, 2024 · 3 comments

Comments

@deining
Copy link
Contributor

deining commented Mar 7, 2024

Describe the bug

This issue is closely related to #170. I doubt whether the issue addressed there is fully resolved.

Steps to reproduce
Steps to reproduce the behavior:

git clone --single-branch -b hugo-module https://github.com/deining/hugo-blog-awesome
cd hugo-blog-awesome/exampleSite
hugo server

Site runs fine with hugo v0.122.0, but not with hugo v0.123.7

Expected behavior
Site should run fine both with hugo v0.122.0 and hugo v0.123.7

The issue can also be seen here.

@MichielVanDerWinden
Copy link
Contributor

MichielVanDerWinden commented Mar 7, 2024

The go.sum for the exampleSite in your branch is set to

github.com/hugo-sid/hugo-blog-awesome v1.13.0 h1:Jy22y4EVbZDzKnwSl0bN7dyaMlvGEZZT8KV+/VIx0vE=
github.com/hugo-sid/hugo-blog-awesome v1.13.0/go.mod h1:oRoqH9/bJDdyQqBoxI77O1oWAwVtn+fTng9MD3vR8A0=

That's the old release that doesn't contain the fix yet.

If you look at this repo's setup you'll see it doesn't contain a go.sum and thus doesn't download a specific version of the hugo-blog-awesome repo but instead uses the one you appoint by running hugo server --themesDir ../.. as shown in the README.MD.

@hugo-sid I think you'll need to create a new release to fix this when using your template as a module.

@hugo-sid
Copy link
Owner

hugo-sid commented Mar 7, 2024

@deining thanks for opening this issue. I agree with the points raised by @MichielVanDerWinden.

Going further, from the Netlify log,
it can be seen that modules/pkg/mod/github.com/hugo-sid/hugo-blog-awesome@v1.13.0 is used, which doesn't contain the fix yet.

6:20:58 PM: hugo v0.123.7-312735366b20d64bd61bff8627f593749f86c964+extended linux/amd64 BuildDate=2024-03-01T16:16:06Z VendorInfo=gohugoio
6:20:58 PM: ERROR render of "page" failed: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-sid/hugo-blog-awesome@v1.13.0/layouts/_default/baseof.html:3:8": execute of template failed: template: _default/single.html:3:8: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-sid/hugo-blog-awesome@v1.13.0/layouts/partials/head.html:2:8": execute of template failed: template: partials/head.html:2:8: executing "partials/head.html" at <partial "meta/main.html" .>: error calling partial: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-sid/hugo-blog-awesome@v1.13.0/layouts/partials/meta/main.html:2:3": execute of template failed: template: partials/meta/main.html:2:3: executing "partials/meta/main.html" at <partial "meta/post.html" .>: error calling partial: "/opt/build/cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-sid/hugo-blog-awesome@v1.13.0/layouts/partials/meta/post.html:5:21": execute of template failed: template: partials/meta/post.html:5:21: executing "partials/meta/post.html" at <.Paginate>: error calling Paginate: pagination not supported for this page: kind: "page", path: "/posts/placeholder-text", file: "/opt/build/repo/exampleSite/content/en/posts/placeholder-text/index.md"

But @deining, this issue has taught me that I should release updates more frequently 😄
This way, users of this theme who rely on Hugo modules for updates can receive them ASAP.

@hugo-sid I think you'll need to create a new release to fix this when using your template as a module.

@MichielVanDerWinden you are right. I will create a release ASAP.

@deining
Copy link
Contributor Author

deining commented Mar 7, 2024

Sorry for the noise, my bad! You are right that my go.mod points to an older version that does not contain the fix. Changed my PR already to point to HEAD of repo, everything is fine now!
Looking forward to see a new release soon!

@deining deining closed this as completed Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants