Path warnings for multilingual content fallbacks after v0.146.0

Hi. I’m looking for help clarifying a Hugo behavior change that was introduced in v0.146.0.

We have a multilingual site that mounts content from directories outside our project. When we run builds, we have it fail in the event of path conflict warnings, like this:
hugo --printPathWarnings --panicOnWarning (we don’t want people to add content that won’t actually be published).

Before v0.146.0, we were able to provide English content as a fallback for Japanese pages that don’t exist, using the method described here: Release v0.96.0 · gohugoio/hugo · GitHub

After upgrading to 0.146.0, builds began to fail due to path warnings like these, where the English and Japanese files conflict with one another:

WARN  Duplicate content path: "/runner/executors/docker_autoscaler" file: "/builds/gitlab-com/localization/tech-docs-forked-projects/prod/gitlab-runner/docs-locale/ja-jp/executors/docker_autoscaler.md" file: "/builds/gitlab-com/localization/tech-docs-forked-projects/prod/gitlab-runner/docs/executors/docker_autoscaler.md"

The problem is also present in the latest release (currently 0.150.0).

I set up an example project to illustrate the problem: Sarah German / Hugo path clash demo · GitLab (see the README for steps to reproduce).

I’m not sure if this is a bug or not since the fallback mount functionality wasn’t documented. From my perspective, it does seem like a bug since the pages do publish as expected if you ignore the path warnings.

Maybe the warnings are just incorrect? Or are we trying to do something that’s no longer supported?

Thanks!

First, thank you for the minimal reproducible example; this is great. I appreciate not having to create one myself.

Second, this is a bug. Although the language fallback use case for mounts is not documented[1], this should just work. That’s why bep put the effort into #9693 and why we created an integration test for this. Note that the integration test is no longer present, at least not in its original form; see #13991.

Finally, I’ll investigate this today and log an issue with my findings.


  1. Documenting every possible use case for a capability is not feasible, though this particular use case probably merits an example in the multilingual section. However, this approach will be mostly superseded by #13679. ↩︎

2 Likes

See https://github.com/gohugoio/hugo/issues/13993.

@jmooring Awesome, thank you for checking this out! We’ll follow the GitHub issue. Appreciate the help.

1 Like

Feel free to chime in on https://github.com/gohugoio/hugo/issues/13993.

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