HugoBlox/hugo-blox-builder

404 not handled correctly with multilingual websites when defaultContentLanguageInSubdir enabled

CravateRouge opened this issue · 1 comments

Preliminary Checks

Description

When setting defaultContentLanguageInSubdir: true, 404 error at the website roots are not handled correctly because hugoblox doesn't generate a 404.html at the root. Then it's the server 404 error page instead of hugoblox default one.

Reproduction Link

https://github.com/CravateRouge/CravateRouge.github.io

Steps to Reproduce

  1. Set defaultContentLanguageInSubdir: true in hugo.yaml
  2. Put all website content into content\en
  3. Remove public folder and relaunch hugo server
  4. Access to a non existing page of the website e.g. example.com/blabla and you'll see the server error page instead of the hugoblox one
    ...

Expected Result

We should have the standard hugoblox 404 page:

image

Actual Result

We have the default 404 server page:

image

What Hugo Module versions does your site use?

module github.com/HugoBlox/theme-landing-page

go 1.19

require (
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20231108143325-448ed0e3bd2b
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240602133901-492e343c2a33
)

What operating system(s) are you seeing the problem on?

Windows, Android, iOS, Linux

What browser(s) are you seeing the problem on?

Firefox, Microsoft Edge

Which Hugo Blox template are you using?

Landing Page

What version of Hugo are you using?

0.126.3