Closed
Description
What version of Hugo are you using (hugo version
)?
$ hugo version hugo v0.140.2-aae02ca612a02e085c08366a9c9279f4abb39d94+extended linux/amd64 BuildDate=2024-12-30T15:01:53Z VendorInfo=snap:0.140.2
Does this issue reproduce with the latest release?
Yes
Code Snippets
{{ with (templates.Defer (dict "data" (dict "foo" "bar") )) }}
{{ end }}
{{ with (templates.Defer (dict "data" (dict "fizz" "buzz") )) }}
{{ end }}
It works after removing others Defer
.
Panic Log
panic: deferred execution with id "__hdeferred/cafc7706cee4572b_12__d=" not found
goroutine 247 [running]:
github.com/gohugoio/hugo/hugolib.(*Site).executeDeferredTemplates.func1.1(0xc001413901?, {0xc0015cc630, 0x23}, 0xc000257680, 0xc001273e88, 0xc001273ea0, 0xa01, 0xa24, 0xc001273e47)
/build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:469 +0x468
github.com/gohugoio/hugo/hugolib.(*Site).executeDeferredTemplates.func1({0xc000a36f8d, 0x27})
/build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:502 +0x247
github.com/gohugoio/hugo/hugolib.(*Site).executeDeferredTemplates.func2({0xc001273f38?, 0xc001273f18?}, {0xc000a36f8d?, 0x0?})
/build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:519 +0x22
github.com/gohugoio/hugo/common/rungroup.Run[...].func1()
/build/hugo/parts/hugo/build/common/rungroup/rungroup.go:64 +0xbd
golang.org/x/sync/errgroup.(*Group).Go.func1()
/build/hugo/parts/hugo/go/pkg/mod/golang.org/x/sync@v0.10.0/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 123
/build/hugo/parts/hugo/go/pkg/mod/golang.org/x/sync@v0.10.0/errgroup/errgroup.go:75 +0x96
panic: deferred execution with id "__hdeferred/cafc7706cee4572b_2__d=" not found
goroutine 251 [running]:
github.com/gohugoio/hugo/hugolib.(*Site).executeDeferredTemplates.func1.1(0xc001832978?, {0xc00177d1d0, 0x22}, 0xc000257680, 0xc00126be88, 0xc00126bea0, 0x978, 0x99a, 0xc00126be47)
/build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:469 +0x468
github.com/gohugoio/hugo/hugolib.(*Site).executeDeferredTemplates.func1({0xc000dc1e6d, 0xb})
/build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:502 +0x247
github.com/gohugoio/hugo/hugolib.(*Site).executeDeferredTemplates.func2({0xc00126bf38?, 0xc00126bf18?}, {0xc000dc1e6d?, 0x0?})
/build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:519 +0x22
github.com/gohugoio/hugo/common/rungroup.Run[...].func1()
/build/hugo/parts/hugo/build/common/rungroup/rungroup.go:64 +0xbd
golang.org/x/sync/errgroup.(*Group).Go.func1()
/build/hugo/parts/hugo/go/pkg/mod/golang.org/x/sync@v0.10.0/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 123
/build/hugo/parts/hugo/go/pkg/mod/golang.org/x/sync@v0.10.0/errgroup/errgroup.go:75 +0x96
panic: deferred execution with id "__hdeferred/cafc7706cee4572b_4__d=" not found
goroutine 255 [running]:
github.com/gohugoio/hugo/hugolib.(*Site).executeDeferredTemplates.func1.1(0xc001a00997?, {0xc001b00000, 0x22}, 0xc000257680, 0xc001263e88, 0xc001263ea0, 0x997, 0x9b9, 0xc001263e47)
/build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:469 +0x468
github.com/gohugoio/hugo/hugolib.(*Site).executeDeferredTemplates.func1({0xc0007b8e3d, 0x16})
/build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:502 +0x247
github.com/gohugoio/hugo/hugolib.(*Site).executeDeferredTemplates.func2({0xc001263f38?, 0xc001263f18?}, {0xc0007b8e3d?, 0x0?})
/build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:519 +0x22
github.com/gohugoio/hugo/common/rungroup.Run[...].func1()
/build/hugo/parts/hugo/build/common/rungroup/rungroup.go:64 +0xbd
golang.org/x/sync/errgroup.(*Group).Go.func1()
/build/hugo/parts/hugo/go/pkg/mod/golang.org/x/sync@v0.10.0/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 123
/build/hugo/parts/hugo/go/pkg/mod/golang.org/x/sync@v0.10.0/errgroup/errgroup.go:75 +0x96