Multilingual multihost issues with Hugo v0.112.3

Hi,

I’m facing some issues with my site since updating to Hugo v0.112.3, specifically with images in my static folder. The live version, built with Hugo v0.111.3, has no issues at all. But, if you build my website with v0.112.3, you’ll notice that some images, specifically the ones stored in static and accessed using an <img> element, are missing (as no found, as if they’re weren’t there, example here: fisiquimicamente/privacy.md at main · rodrigoalcarazdelaosa/fisiquimicamente · GitHub). My language selector in the menu bar also stopped working.

Can someone tell what do I need to change?

Thank you very much,
Rodrigo

I suspect you have found a bug. Can you create an issue at Issues · gohugoio/hugo · GitHub and I will fix it during the weekend.

In the meantime I suggest you downgrade to 0.111.3.

1 Like

Thanks, @bep. I’ll submit an issue right away (Multilingual multihost issues with Hugo v0.112.3 · Issue #11020 · gohugoio/hugo · GitHub), although I haven’t been able to reproduce the static images issue with a minimal site (using a multihost multilingual configuration), so it may be related to my theme (Wowchemy).

2 Likes

OK, thanks for that, I have a nagging feeling about what it can be.

1 Like

When I build your site locally, I don’t see any missing images on the privacy page:

go.mod

module github.com/rodrigoalcarazdelaosa/fisiquimicamente

go 1.20

require (
	github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify v1.0.1-0.20230520134102-1b9f1397c1f9 // indirect
	github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify-cms v1.0.1-0.20230520134102-1b9f1397c1f9 // indirect
	github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-reveal v0.0.0-20220925210429-230d4a35ce73 // indirect
	github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5 v5.7.1-0.20230520134102-1b9f1397c1f9 // indirect
)

go.sum

github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-core v0.1.0/go.mod h1:kJwI9H8dicHQCnP8G9EvUDI+oNg/yXcGsjGjwjXuM8I=
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-core v0.2.0/go.mod h1:kJwI9H8dicHQCnP8G9EvUDI+oNg/yXcGsjGjwjXuM8I=
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify v1.0.1-0.20230520134102-1b9f1397c1f9 h1:i07qPSwQYycLv0w/SGMdEz8Nl4AGMgDJwen6Q82ShAk=
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify v1.0.1-0.20230520134102-1b9f1397c1f9/go.mod h1:s40UgLsWfVyCLQ2F4F3dBcNfZOXcPGld7KxsKhZdzvM=
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify-cms v1.0.1-0.20230520134102-1b9f1397c1f9 h1:S9SwL7XZeOojYqaTGVKTgT5cLRG4/pN5OQ3fBypz3Dw=
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify-cms v1.0.1-0.20230520134102-1b9f1397c1f9/go.mod h1:X1mETJo6Lkv9tEgfU0UYFRiRInf0RbgW+s1RKXB4GMA=
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-reveal v0.0.0-20220925210429-230d4a35ce73 h1:aYrCk933sLZPdRNH8RPBO9zUzXPRnrEEpm25jF06Z4E=
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-reveal v0.0.0-20220925210429-230d4a35ce73/go.mod h1:u2hgU45C6Oi3CwMzSNvTwuRTsKs7O46EG3MTjNKu7gE=
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-seo v0.1.0/go.mod h1:R01vz++1i/KR2n00aWGcs6m/L7ky1klbrpqA2KXjMCk=
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5 v5.7.1-0.20230520134102-1b9f1397c1f9 h1:eJ94ty39z3I2BKBpUCy3gHUrJbADxWHfKzScwGe9af8=
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5 v5.7.1-0.20230520134102-1b9f1397c1f9/go.mod h1:aTjV1UoWPt03vYsb6TImLXMlby6p1lXF9aUy+GnAuqw=

Regarding the language switcher…

None of the language objects have a weight key. When I do this, everything seems to work OK.

# Español
es:
  baseURL: 'https://fisiquimicamente.com/'
  weight: 1
  languageCode: es
  contentDir: content/es

# Inglés
en:
  baseURL: 'https://physichemically.com/'
  weight: 2
  languageCode: en
  contentDir: content/en

# Catalán
ca:
  baseURL: 'https://fisiquimicament.com/'
  weight: 3
  languageCode: ca
  contentDir: content/ca

Please test.

That’s quite strange. I have even removed my local copy and recloned my repo, tried different browsers, cleared caches, but I still can’t see the images:

I went ahead and updated my live version and there I can see the images :thinking:.

Regarding the language switcher, indeed adding weights now everything works fine again.

Update

I was using this script to view my site locally, which has the --renderStaticToDisk flag. If I use just hugo server, everything is fine. In any case, in all previous Hugo updates I’ve been using the same script and had no problems, so maybe with this update and that flag something needs to be done.

I’m using macOS.

I cloned your project again just now and ran:

rm -rf resources/ public/ && hugo server --renderStaticToDisk
Version Result
v0.111.3 No missing images on home page
v0.112.3 Some missing images on home page
rm -rf resources/ public/ && hugo server 
Version Result
v0.111.3 No missing images on home page
v0.112.3 No missing images on home page

Trying to deconstruct the Wowchemy modules and your image-heavy site is probably not a good use of my time, so I’ll try the bottom-up approach to get a minimal reproducible example.

https://github.com/gohugoio/hugo/issues/11026

2 Likes

Oh! I thought it was my setup! Glad to know this was fixed in 112.4.