WARN deprecated: .Site.IsMultiLingual was deprecated..Use hugo.IsMultilingual instead

Hello everyone,

I’m getting an error in my header.html file which is kind of odd:

WARN deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.124.0 and will be removed in a future release. Use hugo.IsMultilingual instead.

I did update my Hugo installation to the latest version
(hugo v0.131.0-bfbee17932ff24009008aa94cdd75c0c41f59279+extended)

but when I change the parts in my header.html from .Site.IsMultilingual to hugo.IsMultilingual
I’m getting this error:

ERROR render of “section” failed: execute of template failed: template: partials/header.html:25:9: executing “header” at : can’t evaluate field IsMultiLingual in type interface {}

Here is my repository:
https://bitbucket.org/webdev-hq/tobias-hopp.de/src/master/themes/hugo-portfolio/layouts/partials/header.html

I’d appreciate any hints on how to solve this. Thanks.

Line 25 maybe :slight_smile:

It’s not changed

Thank you for the hint and having a look at it.

I’ve left it in because this currently works (with the deprecation warning), I can change and commit it, but then my local dev-installation is basically broken. Shall I commit the change?

Change it locally and try to fix “basically broken” or come with the error messages if you get stuck

p.s. it’s a bad idea to tell you have changed and provide an unchanged code. In that case just create a new branch (or even repo) always a good idea to do such upgrades on a branch anyway :wink:

also with Hugo 131.0

  • cloned your repo,
  • changed all three occurances of .Site.IsMultiLingual to hugo.IsMultilingual

no errors/warnings

site renders in server
translation of home (just one text) and first post seem to work

so “basically broken” stands for?

To me, basically broken does mean: I can’t make any progress due to this error, which I guess is some sort of true when you look at the screenshot.

So, how did you fix this?

Yes, I did change the 3 lines (from .Site.IsMultilingual to hugo.IsMultilingual) - same result as you can see in the screenshot.

Try hugo.IsMultilingual not hugo.IsMultiLingual.

2 Likes

I thought, that this fixed it - a couple of minutes ago.

I have added the changes and commited them ( hugo.IsMultilingual w/o capital L in the middle)

However: If I run the build script, I’m still getting this error:

Dev-Mode is working fine with no errors now.

Ralax and read carfully… also with the error before. :slight_smile:

This is hugo 92.2…

That wont’t work

Ps. Yes, hogo is not case sensitive at some cases but on others :wink:

Thanks for calming me down :joy:

It’s dawning on me: This is the WSL2-Terminal I’m using, which in turn, I guess, uses the Hugo installation from WSL2 (which I’ve just switched from).

The reasons for all my yelling is that I can’t get into some kind of workflow at all.
It’s just awkward - now publishing via the deploy script won’t work under windows…

./deploy simply won’t do anything now.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.