ERROR deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.124.0

Hugo will no longer server or build the site I’ve been working on. I can’t find anywhere where .Site.IsMultiLingual is defined. It’s not in my hugo.toml file and not in my theme.toml file.

I built a site based off of the theme meghna-hugo. Last night, before the upgrade to Hugo, I would only get a warning. Today, I upgraded my system and I got version 0.124 and it is now reporting an error.

ERROR deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.136.2 and will be removed in Hugo 0.137.0. Us
e hugo.IsMultilingual instead.

How would I go about finding how to resolve this? I’ve also tried to add hugo.IsMultilingual to my hugo.toml file and that has not worked either.

I’ll also add that the error doesn’t tell me where the issue is. I can’t find it anywhere in my project.

 hugo serve
Watching for changes in /home/jason/websites/meghna-hugo/{archetypes,assets,content,data,i18n,layouts,static,themes}
Watching for config changes in /home/jason/websites/meghna-hugo/hugo.toml
Start building sites … 
hugo v0.136.2+extended linux/amd64 BuildDate=unknown

ERROR deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.124.0 and will be removed in Hugo 0.137.0. Use hugo.IsMultilingual instead.
Built in 21 ms
Error: error building site: logged 1 error(s)

I’m lost as to where I should look or how I should define hugo.IsMultilingual as I just can’t find where site.IsMultiLingual is defined in this project.

There are quite a few forks of that theme around. I checked this one: GitHub - themefisher/meghna-hugo: Meghna Hugo is a responsive, minimalist, lightweight, and fast loading one-page business theme built with HTML5/CSS3, Hugo, JavaScript, and JQuery.

I don’t know how you installed it, but the theme uses this in layouts/partials/navigation.html

So if you installed according to the instructions, you should find the file in: /home/jason/websites/meghna-hugo/layouts/partials/navigation.html

You should open in issue in their github issue tracker at : Issues · themefisher/meghna-hugo · GitHub

As a workaround in the meanwhile you can:

  • go back to your old hugo version
  • patch the file yourself by
    • and change the code as stated in the error message.

p.s. Keep in mind that last release was in 2021 and last master update one year ago. So there could come up more with recent hugo versions

pp.s. cloning a theme and directly adding/editing stuff in that folder you might get some problems when updating the theme… cause you mix their and your files.

Thank you! I’m not sure why the global search didn’t find it in VSCode. The issue was in meghna-hugo/layouts/partials/navigation.html

Replacing
<!-- Language List --> {{- if site.IsMultiLingual }}

with

				<!-- Language List -->
				{{- if hugo.IsMultilingual }}

resolved the issue.

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