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

Hugo 0.112.0 fix #561

Merged
merged 1 commit into from
May 25, 2023
Merged

Hugo 0.112.0 fix #561

merged 1 commit into from
May 25, 2023

Conversation

bilke
Copy link
Contributor

@bilke bilke commented May 24, 2023

Context in warnings.html is already .Site.

Fixes a build issue with Hugo 0.112.0.

Fixes #560.

Fixes a build issue with Hugo 0.112.0.

Fixes jpanther#560.
@netlify
Copy link

netlify bot commented May 24, 2023

Deploy Preview for hugo-congo ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit d96fcff
🔍 Latest deploy log https://app.netlify.com/sites/hugo-congo/deploys/646db52f6f0448000880792d
😎 Deploy Preview https://deploy-preview-561--hugo-congo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@jpanther
Copy link
Owner

Thanks for this fix!

@jpanther jpanther merged commit 8ff0cf9 into jpanther:dev May 25, 2023
@bilke bilke deleted the hugo-0.112.0-fix branch May 25, 2023 06:27
@jmwyf
Copy link

jmwyf commented Jun 24, 2023

@jpanther please merge dev to stable

@jpanther
Copy link
Owner

This fix has already been released on the stable branch and is included in v2.6.0. Are you running the latest release?

@kevinlinxc
Copy link

kevinlinxc commented Jun 25, 2023

Not OP but whether I use dev or stable, I still see this issue:

> git submodule update --remote 
Submodule path 'themes/congo': checked out '05ece71d6109f63512eba9e50e300845f8fad115'
> hugo server --ignoreCache
Start building sites … 
hugo v0.114.1+extended darwin/arm64 BuildDate=unknown

ERROR render of "page" failed: "/var/folders/qs/bv9nbl9n0wq54lsh3b2w9ztm0000gn/T/hugo_cache_kevinlinxc/modules/filecache/modules/pkg/mod/github.com/jpanther/congo/v2@v2.4.2/layouts/_default/baseof.html:1:4": execute of template failed: template: _default/single.html:1:4: executing "_default/single.html" at <partial "partials/functions/warnings.html" .Site>: error calling partial: "/var/folders/qs/bv9nbl9n0wq54lsh3b2w9ztm0000gn/T/hugo_cache_kevinlinxc/modules/filecache/modules/pkg/mod/github.com/jpanther/congo/v2@v2.4.2/layouts/partials/functions/warnings.html:1:14": execute of template failed: template: partials/functions/warnings.html:1:14: executing "partials/functions/warnings.html" at <.Site.Params.showAppearanceSwitcher>: can't evaluate field Site in type *page.siteWrapper
Built in 63 ms
Error: error building site: render: failed to render pages: render of "page" failed: "/var/folders/qs/bv9nbl9n0wq54lsh3b2w9ztm0000gn/T/hugo_cache_kevinlinxc/modules/filecache/modules/pkg/mod/github.com/jpanther/congo/v2@v2.4.2/layouts/_default/baseof.html:1:4": execute of template failed: template: _default/single.html:1:4: executing "_default/single.html" at <partial "partials/functions/warnings.html" .Site>: error calling partial: "/var/folders/qs/bv9nbl9n0wq54lsh3b2w9ztm0000gn/T/hugo_cache_kevinlinxc/modules/filecache/modules/pkg/mod/github.com/jpanther/congo/v2@v2.4.2/layouts/partials/functions/warnings.html:1:14": execute of template failed: template: partials/functions/warnings.html:1:14: executing "partials/functions/warnings.html" at <.Site.Params.showAppearanceSwitcher>: can't evaluate field Site in type *page.siteWrapper

Am I doing anything wrong?
Edit: looks like it's using Hugo v 2.4.2, I must be doing something wrong with the cache?

@jpanther
Copy link
Owner

Have you tried using the command hugo mod clean? It looks like your Hugo modules have cached an old version of the theme.

@kevinlinxc
Copy link

FIgured it out, I have the submodule just for code reference, the actual version being used is the go module, so updating go.mod to version 2.6.1 fixed this problem, thank you.

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

Successfully merging this pull request may close these issues.

"error calling partial" and "can't evaluate field Site in type *page.siteWrapper"
4 participants