{"record":{"id":"13674bc60b6f1227","repo":"gohugoio/hugo","slug":"v-failed-to-render-pages-w","errorCode":null,"errorMessage":"%v failed to render pages: %w","messagePattern":"(.+?) failed to render pages: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"hugolib/site_render.go","lineNumber":118,"sourceCode":"\t\t\t\t}\n\t\t\t}\n\t\t\treturn radix.WalkContinue, nil\n\t\t},\n\t}\n\n\tif err := w.Walk(context.Background()); err != nil {\n\t\treturn err\n\t}\n\n\tclose(pages)\n\n\twg.Wait()\n\n\tclose(results)\n\n\terr := <-errs\n\tif err != nil {\n\t\treturn fmt.Errorf(\"%v failed to render pages: %w\", s.resolveDimensionNames(), err)\n\t}\n\treturn nil\n}\n\nfunc pageRenderer(\n\tctx *siteRenderContext,\n\ts *Site,\n\tpages <-chan *pageState,\n\tresults chan<- error,\n\twg *sync.WaitGroup,\n) {\n\tdefer wg.Done()\n\n\tsendErr := func(err error) bool {\n\t\tselect {\n\t\tcase results <- err:\n\t\t\treturn true\n\t\tcase <-s.h.Done():","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/gohugoio/hugo/blob/52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2/hugolib/site_render.go#L100-L136","documentation":"The concurrent page-rendering pipeline (renderPages, which spawns workers via pageRenderer) received an error from one of the workers and propagated it through an error-collation channel. The message prefixes the resolved dimension names (language/version/role from s.resolveDimensionNames()) and wraps the per-page rendering error with %w. It signals that at least one page failed to render for the given site slice.","triggerScenarios":"Any per-page render error (template failure at site_render.go:71-120) sent on the results channel and surfaced via errs at line 116-118. The root cause is typically a layout/template error for a specific page under that language/version/role combination.","commonSituations":"A multilingual or multi-version site where one variant's layout is broken (missing partial, nil method) while others render fine; a page resource only present in some languages causing transform errors; output format mismatch in one dimension.","solutions":["Unwrap the %w error to find which specific page and template call failed.","Reproduce for just that dimension by filtering the build (e.g. hugo --renderSegments or environment-specific config) to iterate faster.","Fix the underlying layout/shortcode error (this error is an aggregator; the real fix is in the wrapped cause).","Re-run hugo to confirm the full build completes across all dimensions."],"exampleFix":"// before: error reported as\n// [en] [v1.2.0] failed to render pages: execute of template failed: ...\n\n// after: fix the named layout referenced in the wrapped error, then rebuild","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Build errors surface via hugo's exit code; unwrap in logs to find the page.\nif err := h.Build(config.BuildCfg{}); err != nil {\n    var re *hugoRenderingError\n    if errors.As(err, &re) {\n        log.Printf(\"dimension %v failed: underlying=%v\", re.Dimension, errors.Unwrap(err))\n    }\n    return err\n}","preventionTips":["Fix per-page template errors promptly; this error only aggregates them.","Build one language/version at a time during debugging to localize failures.","Run the full multilingual build in CI to catch dimension-specific breakage."],"tags":["rendering","multilingual","concurrency","hugo"],"backgroundTag":null,"analyzedSha":"52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2","analyzedAt":"2026-08-09T21:49:36.660Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}