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

attachments: fix build error since Hugo 0.112 #540

Closed
raum51 opened this issue May 24, 2023 · 1 comment
Closed

attachments: fix build error since Hugo 0.112 #540

raum51 opened this issue May 24, 2023 · 1 comment
Assignees
Labels
bug Something isn't working hugo This is a topic related to Hugo itself but not the theme
Milestone

Comments

@raum51
Copy link

raum51 commented May 24, 2023

Hi,
today I updated the theme and Hugo and got the followoing error message:

Error: error building site: "C:\Users\h35\_git\dokumentation\content\de\intern\produktion\schnittstellen\cloudapi\lely.md:85:3": failed to render shortcode "attachments": failed to process shortcode: execute of template failed: template: shortcodes/attachments.html:2:4: executing "shortcodes/attachments.html" at <partial "shortcodes/attachments.html" (dict "context" .Page "color" (.Get "color") "content" .Inner "icon" (.Get "icon") "pattern" (.Get "pattern") "style" (.Get "style") "sort" (.Get "sort") "title" (.Get "title"))>: error calling partial: "C:\Users\h35\_git\dokumentation\themes\hugo-theme-relearn\layouts\partials\shortcodes\attachments.html:35:44": execute of template failed: template: partials/shortcodes/attachments.html:35:44: executing "partials/shortcodes/attachments.html" at <.Language.ContentDir>: can't evaluate field ContentDir in type *langs.Language

I've tested this Hugo versions:
0.112.2 (latest version) ==> ERROR
0.112.0 ==> ERROR
0.111.3 ==> everything OK

Maybe it has to do something with the "Improved language config handling"
https://gohugo.io/content-management/multilingual/#changes-in-hugo-01120
https://github.com/gohugoio/hugo/releases/tag/v0.112.0
gohugoio/hugo#10620)

@McShelby
Copy link
Owner

We see, what happens. https://discourse.gohugo.io/t/after-upgrade-to-0-112-page-language-contentdir-undefined/44528/3

Till then, the theme is only compatible up to Hugo < 0.112.0

@McShelby McShelby self-assigned this May 24, 2023
@McShelby McShelby added bug Something isn't working hugo This is a topic related to Hugo itself but not the theme labels May 24, 2023
@McShelby McShelby removed their assignment May 24, 2023
@McShelby McShelby changed the title Error by attachements shortcode since Hugo 0.112 attachements: fix build error since Hugo 0.112 May 24, 2023
@McShelby McShelby changed the title attachements: fix build error since Hugo 0.112 attachments: fix build error since Hugo 0.112 May 24, 2023
McShelby added a commit that referenced this issue May 25, 2023
@McShelby McShelby self-assigned this May 25, 2023
@McShelby McShelby added this to the 5.15.0 milestone May 25, 2023
tari added a commit to tari/83pa28d that referenced this issue Jul 1, 2023
This update to hugo-relearn version 5.17.1, released on 2023-06-23.
It makes the theme work correctly with Hugo 0.112 and newer
(McShelby/hugo-theme-relearn#540).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hugo This is a topic related to Hugo itself but not the theme
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants