Multilingual inter-page links

I just shifted my site to make room for multilingual content. The problem I am now having is that links that go between pages are no longer working. Here’s the rendering error:

    Building sites … ERROR 2019/02/06 14:54:53 [en] REF_NOT_FOUND: Ref "/glossary/vocabulary": "..snip../content/en-us/designs/gateway/": page not found
    ERROR 2019/02/06 14:54:53 [en] REF_NOT_FOUND: Ref "/glossary/vocabulary": "..snip../content/en-us/designs/gateway/": page not found
    Total in 385 ms
    Error: Error building site: logged 2 error(s)

…and my config file looks like this:

    "DefaultContentLanguage": "en",  
    "languages": {
      "en": {
        "lang": "en",
        "langCode": "en-us",
        "contentDir": "content/en-us",
        "languageName": "English",
        "weight": 1

…and here’s the offending REF call.
{{< ref "/glossary/vocabulary#endpoint" >}}

What am I doing wrong? Any thoughts?

Where is the relevant content file located?

here are the file locations:

    +- content/en-us/designs/gateway/
    +- content/en-us/glossary/

…and this is the publicly available repo wherein I am making the changes.

Just wondering if anyone has any new thoughts on this? I am still dead in the water with my multi-lingual work.

ARGH! I believe the reason this was not working and complaining with a REF_NOT_FOUND error is because the link target is a draft. I just tried this command: hugo --buildDrafts -v and the build worked! Sure would be better if there was some sort of suggestion in the Error message, like “maybe REF is a draft?

Developers used to put abend / reason codes into their messages so one could look up in detail what each error meant with possible fixes. I really miss them.

1 Like