{"record":{"id":"26209c0fef92f60c","repo":"gohugoio/hugo","slug":"missing-taxonomy-s","errorCode":null,"errorMessage":"missing taxonomy: %s","messagePattern":"missing taxonomy: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"hugolib/content_map_page.go","lineNumber":1189,"sourceCode":"\n\tfor _, viewName := range m.cfg.taxonomyConfig.views {\n\t\tkey := viewName.pluralTreeKey\n\t\ttaxonomies[viewName.plural] = make(page.Taxonomy)\n\t\tw := &doctree.NodeShiftTreeWalker[contentNode]{\n\t\t\tTree:     m.treePages,\n\t\t\tPrefix:   paths.AddTrailingSlash(key),\n\t\t\tLockType: doctree.LockTypeRead,\n\t\t\tHandle: func(s string, n contentNode) (radix.WalkFlag, error) {\n\t\t\t\tp := n.(*pageState)\n\n\t\t\t\tswitch p.Kind() {\n\t\t\t\tcase kinds.KindTerm:\n\t\t\t\t\tif !p.m.shouldList(true) {\n\t\t\t\t\t\treturn radix.WalkContinue, nil\n\t\t\t\t\t}\n\t\t\t\t\ttaxonomy := taxonomies[viewName.plural]\n\t\t\t\t\tif taxonomy == nil {\n\t\t\t\t\t\treturn radix.WalkStop, fmt.Errorf(\"missing taxonomy: %s\", viewName.plural)\n\t\t\t\t\t}\n\t\t\t\t\tif p.m.term == \"\" {\n\t\t\t\t\t\tpanic(\"term is empty\")\n\t\t\t\t\t}\n\t\t\t\t\tk := strings.ToLower(p.m.term)\n\n\t\t\t\t\terr := m.treeTaxonomyEntries.WalkPrefix(\n\t\t\t\t\t\tdoctree.LockTypeRead,\n\t\t\t\t\t\tpaths.AddTrailingSlash(s),\n\t\t\t\t\t\tfunc(ss string, wn *weightedContentNode) (bool, error) {\n\t\t\t\t\t\t\ttaxonomy[k] = append(taxonomy[k], page.NewWeightedPage(wn.weight, wn.n.(page.Page), wn.term.Page()))\n\t\t\t\t\t\t\treturn false, nil\n\t\t\t\t\t\t},\n\t\t\t\t\t)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn radix.WalkStop, err\n\t\t\t\t\t}\n","sourceCodeStart":1171,"sourceCodeEnd":1207,"githubUrl":"https://github.com/gohugoio/hugo/blob/52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2/hugolib/content_map_page.go#L1171-L1207","documentation":"Returned during pageMap.CreateSiteTaxonomies when, inside the per-view walker, taxonomies[viewName.plural] is nil for a KindTerm page being processed. The map was initialized for that plural key just above (line 1174), so a nil entry implies the viewName.plural being iterated does not match a populated key — an internal taxonomy configuration inconsistency, not a user content error per se.","triggerScenarios":"taxonomyConfig.views contains a view whose plural key, when used to look up in the freshly-built taxonomies map, returns nil. This can happen with malformed taxonomy config (e.g. plural/singular misconfiguration, duplicate/empty plural keys) or a programming regression in how views are configured.","commonSituations":"Misconfiguring taxonomies in hugo config (e.g. tag/tags collision, empty plural, singular==plural edge cases); upgrading Hugo across a version where taxonomy key handling changed; custom taxonomies with reserved names.","solutions":["Review the taxonomies config block: each entry should be singular: plural form (e.g. tag: tags), non-empty, distinct.","Ensure no plural key is empty or duplicated across taxonomies.","If using multilingual taxonomies, verify the per-language config is consistent.","Report with the failing plural name if config looks correct — this often signals an internal bug."],"exampleFix":"# before (config.toml)\n[taxonomies]\n  tag = \"\"   # empty plural triggers missing-taxonomy\n# after\n[taxonomies]\n  tag = \"tags\"","handlingStrategy":"validation","validationCode":"func validateTaxonomyConfig(tax map[string]string) error {\n    seen := map[string]bool{}\n    for sing, plur := range tax {\n        if plur == \"\" || sing == \"\" { return fmt.Errorf(\"empty taxonomy key\") }\n        if seen[plur] { return fmt.Errorf(\"duplicate plural %q\", plur) }\n        seen[plur] = true\n    }\n    return nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Configure each taxonomy as singular = plural, both non-empty and unique.","Keep multilingual taxonomy configs consistent.","Report persisting cases with the plural name if config is correct — likely an internal bug."],"tags":["taxonomy","config","content-map","hugolib"],"backgroundTag":null,"analyzedSha":"52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2","analyzedAt":"2026-08-09T21:49:36.660Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}