Errors compiling site after extended period of inactivity

Hi all. I created my website using hugo several years ago (about 4). I setup CI/CD, had it all working, all was good.

Yesterday, I tried to add a new page and got pipeline errors compiling the new site. These errors seemed to be mostly about things that have been deprecated since like custom params on the language top level. Those ones I’ve resolved, I’m only left with this one error that occurs multiple times. The error is:

can't evaluate field Get in type *langs.Language

Here is the complete build log:

Running with gitlab-runner 16.11.0~pre.21.gaa21be2d (aa21be2d)
  on blue-5.saas-linux-small-amd64.runners-manager.gitlab.com/default -AzERasQ, system ID: s_4cb09cee29e2
  feature flags: FF_USE_IMPROVED_URL_MASKING:true
Preparing the "docker+machine" executor 00:06
Using Docker executor with image registry.gitlab.com/pages/hugo/hugo_extended:latest ...
Authenticating with credentials from job payload (GitLab Registry)
Pulling docker image registry.gitlab.com/pages/hugo/hugo_extended:latest ...
Using docker image sha256:6b53ac8271b3635b1d57643c2b36a6fe022f0e7b8e270e0947984417e5519f7d for registry.gitlab.com/pages/hugo/hugo_extended:latest with digest registry.gitlab.com/pages/hugo/hugo_extended@sha256:f2ec2ef57fcda62e33f19030ac7431f97f6a565e80301f20edb592dac5b80d27 ...
Preparing environment 00:02
Running on runner--azerasq-project-16202224-concurrent-0 via runner-azerasq-s-l-s-amd64-1713233166-2e865faf...
Getting source from Git repository 00:01
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/tydel/website/.git/
Created fresh repository.
Checking out c01cccba as detached HEAD (ref is master)...
Updating/initializing submodules recursively with git depth set to 50...
Updated submodules
$ git remote set-url origin "${CI_REPOSITORY_URL}"
Executing "step_script" stage of the job script 00:01
Using docker image sha256:6b53ac8271b3635b1d57643c2b36a6fe022f0e7b8e270e0947984417e5519f7d for registry.gitlab.com/pages/hugo/hugo_extended:latest with digest registry.gitlab.com/pages/hugo/hugo_extended@sha256:f2ec2ef57fcda62e33f19030ac7431f97f6a565e80301f20edb592dac5b80d27 ...
$ apk add --update --no-cache git
fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz
OK: 24 MiB in 31 packages
$ hugo
ERROR deprecated: config: languages.en.subtitle: custom params on the language top level was deprecated in Hugo v0.112.0 and will be removed in Hugo 0.125.0. Put the value below [languages.en.params]. See https://gohugo.io/content-management/multilingual/#changes-in-hugo-01120
ERROR deprecated: config: languages.en.keywords: custom params on the language top level was deprecated in Hugo v0.112.0 and will be removed in Hugo 0.125.0. Put the value below [languages.en.params]. See https://gohugo.io/content-management/multilingual/#changes-in-hugo-01120
ERROR deprecated: config: languages.en.readotherposts: custom params on the language top level was deprecated in Hugo v0.112.0 and will be removed in Hugo 0.125.0. Put the value below [languages.en.params]. See https://gohugo.io/content-management/multilingual/#changes-in-hugo-01120
Start building sites … 
hugo v0.124.1+extended linux/amd64 BuildDate=unknown
ERROR render of "home" failed: "/builds/tydel/website/themes/hello-friend-ng/layouts/_default/baseof.html:16:19": execute of template failed: template: index.html:16:19: executing "footer" at <partial "footer.html" .>: error calling partial: "/builds/tydel/website/themes/hello-friend-ng/layouts/partials/footer.html:9:42": execute of template failed: template: partials/footer.html:9:42: executing "partials/footer.html" at <.Site.Language.Get>: can't evaluate field Get in type *langs.Language
ERROR render of "page" failed: "/builds/tydel/website/themes/hello-friend-ng/layouts/_default/baseof.html:16:19": execute of template failed: template: _default/single.html:16:19: executing "footer" at <partial "footer.html" .>: error calling partial: "/builds/tydel/website/themes/hello-friend-ng/layouts/partials/footer.html:9:42": execute of template failed: template: partials/footer.html:9:42: executing "partials/footer.html" at <.Site.Language.Get>: can't evaluate field Get in type *langs.Language
ERROR render of "term" failed: "/builds/tydel/website/themes/hello-friend-ng/layouts/_default/baseof.html:16:19": execute of template failed: template: _default/list.html:16:19: executing "footer" at <partial "footer.html" .>: error calling partial: "/builds/tydel/website/themes/hello-friend-ng/layouts/partials/footer.html:9:42": execute of template failed: template: partials/footer.html:9:42: executing "partials/footer.html" at <.Site.Language.Get>: can't evaluate field Get in type *langs.Language
ERROR render of "taxonomy" failed: "/builds/tydel/website/themes/hello-friend-ng/layouts/_default/baseof.html:16:19": execute of template failed: template: _default/list.html:16:19: executing "footer" at <partial "footer.html" .>: error calling partial: "/builds/tydel/website/themes/hello-friend-ng/layouts/partials/footer.html:9:42": execute of template failed: template: partials/footer.html:9:42: executing "partials/footer.html" at <.Site.Language.Get>: can't evaluate field Get in type *langs.Language
Total in 60 ms
Error: error building site: render: failed to render pages: render of "404" failed: "/builds/tydel/website/themes/hello-friend-ng/layouts/_default/baseof.html:16:19": execute of template failed: template: 404.html:16:19: executing "footer" at <partial "footer.html" .>: error calling partial: "/builds/tydel/website/themes/hello-friend-ng/layouts/partials/footer.html:9:42": execute of template failed: template: partials/footer.html:9:42: executing "partials/footer.html" at <.Site.Language.Get>: can't evaluate field Get in type *langs.Language
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1

I’ve tried googling as well as searching this Discourse for similar errors involving Site.Language.Get to no avail.

The code causing the error in footer.html is this:

<span>{{- with (not (in (.Site.Language.Get "disableKinds") "RSS")) }} <a href="{{ "posts/index.xml" | absLangURL }}" target="_blank" title="rss"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg></a>{{ end }}</span>

The theme I’m using is hello-friend-ng

As the pinned forum post suggests, I’m also including my hugo env output:

tydel@mbp website % hugo env
hugo v0.124.1-db083b05f16c945fec04f745f0ca8640560cf1ec+extended darwin/amd64 BuildDate=2024-03-20T11:40:10Z VendorInfo=brew
GOOS="darwin"
GOARCH="amd64"
GOVERSION="go1.22.2"
github.com/sass/libsass="3.6.5"
github.com/webmproject/libwebp="v1.3.2"

Any help would be appreciated. Thanks!

Old way

[languages.de]
weight = 2
foo = 'bar'

Then you could “get” it with `.Site.Language.Get “foo”.

New way:

[languages.de]
title = 'My Site (DE)'
languageCode = 'de-DE'
languageDirection = 'ltr'
languageName = 'Deutsch'
weight = 2
[languages.de.params]
foo = 'bar'

Then retrieve the value with .Site.Params.foo or .Site.Param "foo".

Interesting. Thanks for the assistance, I made the change to footer.html to reference .Page.Params.disableKinds and all is good.