{"record":{"id":"ba62c8a1641cbea9","repo":"gohugoio/hugo","slug":"no-path-info","errorCode":null,"errorMessage":"no path info","messagePattern":"no path info","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"hugolib/hugo_sites.go","lineNumber":712,"sourceCode":"\t\t\treturn false, initPage(p)\n\t\t},\n\t)\n}\n\nfunc (h *HugoSites) loadData() error {\n\th.data = make(map[string]any)\n\tw := hugofs.NewWalkway(\n\t\thugofs.WalkwayConfig{\n\t\t\tFs:         h.PathSpec.BaseFs.Data.Fs,\n\t\t\tIgnoreFile: h.SourceSpec.IgnoreFile,\n\t\t\tPathParser: h.Conf.PathParser(),\n\t\t\tWalkFn: func(ctx context.Context, path string, fi hugofs.FileMetaInfo) error {\n\t\t\t\tif fi.IsDir() {\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t\tpi := fi.Meta().PathInfo\n\t\t\t\tif pi == nil {\n\t\t\t\t\tpanic(\"no path info\")\n\t\t\t\t}\n\t\t\t\treturn h.handleDataFile(source.NewFileInfo(fi))\n\t\t\t},\n\t\t})\n\n\tif err := w.Walk(); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (h *HugoSites) handleDataFile(r *source.File) error {\n\tvar current map[string]any\n\n\tf, err := r.FileInfo().Meta().Open()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"data: failed to open %q: %w\", r.LogicalName(), err)\n\t}","sourceCodeStart":694,"sourceCodeEnd":730,"githubUrl":"https://github.com/gohugoio/hugo/blob/52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2/hugolib/hugo_sites.go#L694-L730","documentation":"A panic in HugoSites.loadData (hugolib/hugo_sites.go:712) when a data file's filesystem metadata has a nil PathInfo (fi.Meta().PathInfo == nil). PathInfo is attached during Hugo's filesystem mounting; nil means the file bypassed the proper path machinery.","triggerScenarios":"A file under /data is reached whose Afero metadata lacks PathInfo — e.g., a custom or broken module mount that did not attach path info, or a custom Afero filesystem injected into the data layer.","commonSituations":"Misconfigured module [[mounts]] for the data dir; a custom filesystem hook bypassing Hugo's mounting; a corrupted Hugo build.","solutions":["Check module [[mounts]] for the data directory are correct","Remove custom filesystem hooks that bypass Hugo's mounting","Report a bug with the mount configuration that reproduces it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if fi.Meta().PathInfo == nil {\n    return fmt.Errorf(\"data file %q has no PathInfo; check module mounts\", fi.Name())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure module [[mounts]] for /data use Hugo's mounting machinery","Avoid injecting custom Afero filesystems that skip path metadata","Report bugs with the mount config that reproduces a nil PathInfo"],"tags":["hugolib","data","filesystem","panic"],"backgroundTag":null,"analyzedSha":"52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2","analyzedAt":"2026-08-09T21:49:36.660Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}