question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

partials/helpers/fragments.html:121:64 error calling GetPage: page reference "//blog/_global" is ambiguous

See original GitHub issue

Is 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:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Cloud-Forgecommented, Apr 1, 2020

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.

1reaction
stp-ipcommented, Mar 24, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found