partials/helpers/fragments.html:121:64 error calling GetPage: page reference "//blog/_global" is ambiguous
See original GitHub issueIs this a BUG REPORT or FEATURE REQUEST?: bug
What happened: getting the following error as I build since last hugo update :
partials/helpers/fragments.html:121:64 error calling GetPage: page reference "//blog/_global" is ambiguous
What you expected to happen: the site should build normally but it doesn’t.
How to reproduce it (as minimally and precisely as possible): To reproduce create a blog section with a _global directory in it.
blog
_global
index.md
nav.md # Rendered
contact.md # Rendered
launch a build command
hugo
Anything else we need to know?:
I think that the problem comes from the line 120 in fragments.html we have this
{{- $page := printf "%s/%s" $directory "_global" -}}
the %s/%s might be problematic here the $page variable now contains : //blog/_global instead of simply /blog/_global
The change I made to be able to build my site was just to remove the %s/ and now it prints the right path : /blog/_global with only one / at the beginning.
Environment:
- Syna Theme version: v0.16.1
- Hugo Static Site Generator v0.66.0/extended linux/amd64 BuildDate: unknown
- Others: Arch linux
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Ambiguous reference in new .GetPage - support - HUGO
error calling GetPage : failed to resolve path from page "/post": page reference "004777.md" is ambiguous. I can't just use $.Site.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My 2 cents : Your error might not be related to the bug. The “ambiguous” error is also a real error that appears when Hugo cannot choose the path of your page, because you didn’t give a specific path.
You’ll have to show use more code and more logs to see whether it’s the bug or an oversight.
This seems to work fine with the latest Hugo 68.3. Assumption is this was a break in version 0.66 and the related issue is this one: https://github.com/gohugoio/hugo/issues/7016
Let me know, if updating to the latest Hugo version fixes this. Please reopen, if it isn’t fixed.