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

relref still not working properly in 0.123.x #12136

Closed
mbevc1 opened this issue Feb 23, 2024 · 4 comments
Closed

relref still not working properly in 0.123.x #12136

mbevc1 opened this issue Feb 23, 2024 · 4 comments

Comments

@mbevc1
Copy link

mbevc1 commented Feb 23, 2024

What version of Hugo are you using (hugo version)?

hugo v0.123.3-a75a659f6fc0cb3a52b2b2ba666a81f79a459376+extended linux/amd64 BuildDate=2024-02-23T17:09:20Z VendorInfo=gohugoio

Does this issue reproduce with the latest release?

Yes

After a fix in 0.123.1 relref is still not working correctly. So #12096 was closed only for relrefs with trailing slash, but it doesn't find files now. Seems like a new regression.

Example:

hugo-1  | Watching for changes in /src/{archetypes,content,data,static,themes}
hugo-1  | Watching for config changes in /src/config.yaml
hugo-1  | Start building sites … 
hugo-1  | hugo v0.123.3-a75a659f6fc0cb3a52b2b2ba666a81f79a459376+extended linux/amd64 BuildDate=2024-02-23T17:09:20Z VendorInfo=gohugoio
hugo-1  | 
hugo-1  | ERROR [en] REF_NOT_FOUND: Ref "/content/blog/20220525-view-from-the-top/index.md": "/src/content/blog/20230911-5-cta/index.md:29:77": page not found
...
hugo-1  | Built in 14685 ms
hugo-1  | Error: error building site: logged 3 error(s)
@jmooring
Copy link
Member

jmooring commented Feb 23, 2024

Please provide a minimal example. Logs are insufficient.

Also, make sure to provide a logical path to the target page.

@mbevc1
Copy link
Author

mbevc1 commented Feb 26, 2024

Even if using full paths like this?

...this [workshop]({{< relref "/content/consulting/workshop.htm" >}})....

@bep
Copy link
Member

bep commented Feb 26, 2024

({{< relref "/content/consulting/workshop.htm" >}})....

That construct is not supported. If it worked in 0.122, that was a happy accident. We are very lenient in relref and try very hard to find the page, but the ref is not relative to the project root, rather the content mount, e.g. /content. The link provided above is useful.

For further trouble shooting, use https://discourse.gohugo.io/

@bep bep closed this as completed Feb 26, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants