mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
4d775cbe95
A partial's rendered output (placeholder included) is cached by partialCached across rebuilds, but BuildState.DeferredExecutions is reset every stage. On a fast-render rebuild the cached string replays the placeholder while doDefer is not called this build, leaving executeDeferredTemplates to panic with "deferred execution with id ... not found". Mark the ctx inside IncludeCached's body execution and have Defer return a clear error if it sees the flag. Catches transitive cases (partialCached -> partial -> Defer) via ctx propagation. Defer in baseof.html and in a plain partial is unaffected. Fixes #13492 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>