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

REF_NOT_FOUND does not show where the ref is located #5371

Closed
pjbakker opened this Issue Oct 29, 2018 · 4 comments

Comments

Projects
2 participants
@pjbakker

pjbakker commented Oct 29, 2018

Situation:

The error in case of a non-existent ref is:

ERROR 2018/10/29 11:43:36 [en] REF_NOT_FOUND: Ref "bank": page not found

Issue:
It does not show me the context or in which file this error occurred. Thus requiring a grep in order to retrieve the error location.

Solution:
Change error message to include filename of page containing the issue, like:

ERROR 2018/10/29 11:43:36 [en] REF_NOT_FOUND: Ref "bank": page not found in "content/financial.md"
@bep

This comment has been minimized.

Member

bep commented Oct 29, 2018

What Hugo version have you tested this with?

@pjbakker

This comment has been minimized.

pjbakker commented Oct 29, 2018

Hugo Static Site Generator v0.49.2/extended darwin/amd64 BuildDate: unknown

@bep bep added the Enhancement label Oct 29, 2018

@bep bep added this to the v0.51 milestone Oct 29, 2018

@bep

This comment has been minimized.

Member

bep commented Oct 29, 2018

Yea, that error isn't all that great ...

@pjbakker

This comment has been minimized.

pjbakker commented Oct 29, 2018

We agree there ;)

bep added a commit to bep/hugo that referenced this issue Nov 1, 2018

bep added a commit to bep/hugo that referenced this issue Nov 1, 2018

hugolib: Add .Position to shortcode
To allow for better error logging in shortcodes. Note that this may be expensive to calculate, so this is primarily for error situations.

See gohugoio#5371

bep added a commit to bep/hugo that referenced this issue Nov 1, 2018

bep added a commit to bep/hugo that referenced this issue Nov 1, 2018

bep added a commit to bep/hugo that referenced this issue Nov 1, 2018

bep added a commit to bep/hugo that referenced this issue Nov 1, 2018

bep added a commit to bep/hugo that referenced this issue Nov 1, 2018

bep added a commit to bep/hugo that referenced this issue Nov 1, 2018

bep added a commit to bep/hugo that referenced this issue Nov 1, 2018

bep added a commit to bep/hugo that referenced this issue Nov 1, 2018

bep added a commit to bep/hugo that referenced this issue Nov 1, 2018

@bep bep closed this in 6180c85 Nov 1, 2018

bep added a commit that referenced this issue Nov 1, 2018

hugolib: Add .Position to shortcode
To allow for better error logging in shortcodes. Note that this may be expensive to calculate, so this is primarily for error situations.

See #5371

bep added a commit that referenced this issue Nov 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment