From 5b87945f23f8fd045004b7b6f65a60664b123245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20R=C3=BCger?= Date: Fri, 13 Mar 2026 01:28:24 +0100 Subject: [PATCH] fix: use ancestry slice for warning log, not meta.Parents ancestry grows to len(meta.Parents)+1. The subsequent warning log indexed meta.Parents[len(ancestry)-1], which is one past the end of meta.Parents, causing an out-of-bounds panic. Use ancestry[len(ancestry)-1] to always reference the last element of the actual slice being validated. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- page/page.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page/page.go b/page/page.go index 2b34a33..28867b1 100644 --- a/page/page.go +++ b/page/page.go @@ -72,7 +72,7 @@ func ResolvePage( log.Warningf( nil, "page %q is not found ", - meta.Parents[len(ancestry)-1], + ancestry[len(ancestry)-1], ) }