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

IsMultiLingual error on build #624

Closed
hennio opened this issue Jun 8, 2024 · 5 comments
Closed

IsMultiLingual error on build #624

hennio opened this issue Jun 8, 2024 · 5 comments

Comments

@hennio
Copy link

hennio commented Jun 8, 2024

Building fails at IsMultilingual. My site is not multilingual btw.

Error

Error: error building site: render: failed to render pages: render of "taxonomy" failed: "/opt/buildhome/repo/themes/hugo-book/layouts/_default/baseof.html:50:5": execute of template failed: template: taxonomy/taxonomy.html:50:5: executing "menu" at <partial "docs/menu" .>: error calling partial: "/opt/buildhome/repo/themes/hugo-book/layouts/partials/docs/menu.html:4:6": execute of template failed: template: partials/docs/menu.html:4:6: executing "partials/docs/menu.html" at <hugo>: can't evaluate field IsMultilingual in type interface {}

hugo.toml

baseURL = 'https://xxxxxxxxxx.pages.dev'
languageCode = 'en-us'
title = 'My shared pages'
theme = 'hugo-book'
@hennio hennio changed the title IsMultiLingual error on buils IsMultiLingual error on build Jun 8, 2024
@kyrylo
Copy link

kyrylo commented Jun 10, 2024

I have the same issue. Locally, it builds, but when I deploy with Cloudflare Pages, I see this error.

chmac added a commit to chmac/hugo-book that referenced this issue Jun 29, 2024
This causes the build to fail as per alex-shpak#624
@chmac
Copy link

chmac commented Jun 29, 2024

It could be that the version of hugo you're using to build is too old. I had this same issue, and eventually realised that debian (on my build docker container) is shipping an old version of hugo.

@chmac
Copy link

chmac commented Jun 29, 2024

Actually, sorry, that was a mistake. I did update hugo, and thought the issue was fixed, but it is not. My workaround was to fork the repo, remove the offending piece from the menu.html and switch my git submodule to my fork instead. My fork is here if it helps anyone, but be advised it will get out of date as I won't copy any updates from upstream. Hopefully this issue gets fixed and I can kill my fork.

@ffleader1
Copy link

Yeah I got this error also
+1 for the problem

@corte
Copy link

corte commented Jul 2, 2024

I got the same problem here, but upgrading Hugo to version v0.128.0 solved the issue for me.
hugo.IsMultilingual was added on version v0.124.0, so your version needs to be that or higher. You can check with command hugo version

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

No branches or pull requests

6 participants