hugolib: Fix REF_NOT_FOUND logging to include page path - hugo - [fork] hugo port for 9front
(HTM) git clone git@git.drkhsh.at/hugo.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
(DIR) commit 6180c85fb8f95e01446b74c50cab3f0480305fe4
(DIR) parent d3a98325c31d7f02f0762e589a4986e55b2a0da2
(HTM) Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date: Thu, 1 Nov 2018 10:04:51 +0100
hugolib: Fix REF_NOT_FOUND logging to include page path
Fixes #5371
Diffstat:
M hugolib/site.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/hugolib/site.go b/hugolib/site.go
@@ -494,10 +494,10 @@ func newSiteRefLinker(cfg config.Provider, s *Site) (siteRefLinker, error) {
}
func (s siteRefLinker) logNotFound(ref, what string, p *Page) {
- if p != nil {
+ if p == nil {
s.errorLogger.Printf("[%s] REF_NOT_FOUND: Ref %q: %s", s.s.Lang(), ref, what)
} else {
- s.errorLogger.Printf("[%s] REF_NOT_FOUND: Ref %q from page %q: %s", s.s.Lang(), ref, p.absoluteSourceRef(), what)
+ s.errorLogger.Printf("[%s] REF_NOT_FOUND: Ref %q from page %q: %s", s.s.Lang(), ref, p.pathOrTitle(), what)
}
}