{"record":{"id":"bba0caa3915f9daf","repo":"siyuan-note/siyuan","slug":"attribute-view-snapshot-context-is-ambiguous-s","errorCode":null,"errorMessage":"attribute view snapshot context is ambiguous [%s]","messagePattern":"attribute view snapshot context is ambiguous \\[(.+?)\\]","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/attribute_view_render.go","lineNumber":1060,"sourceCode":"\tindex, err := repo.GetIndex(indexID)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tfiles, err := repo.GetFiles(index)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tvar matches []*entity.File\n\tfor _, file := range files {\n\t\tif strings.HasSuffix(file.Path, \"/storage/av/\"+avID+\".json\") {\n\t\t\tmatches = append(matches, file)\n\t\t}\n\t}\n\tif len(matches) == 0 {\n\t\treturn \"\", av.ErrAttributeViewNotFound\n\t}\n\tif len(matches) != 1 {\n\t\treturn \"\", fmt.Errorf(\"attribute view snapshot context is ambiguous [%s]\", avID)\n\t}\n\tboxID := avBoxIDFromRepoPath(matches[0].Path)\n\tif IsEncryptedBox(boxID) {\n\t\treturn boxID, nil\n\t}\n\treturn \"\", nil\n}\n\n// ResolveHistoryAttributeViewBoxID 返回历史属性视图的唯一加密笔记本上下文。\nfunc ResolveHistoryAttributeViewBoxID(avID, created string) (string, error) {\n\tif !ast.IsNodeIDPattern(avID) {\n\t\treturn \"\", ErrInvalidID\n\t}\n\tcreatedUnix, err := strconv.ParseInt(created, 10, 64)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"parse created [%s] failed: %w\", created, err)\n\t}\n\tdirPrefix := time.Unix(createdUnix, 0).Format(\"2006-01-02-150405\")","sourceCodeStart":1042,"sourceCodeEnd":1078,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/251596fc0de2f9528c00c224252fd073a99973f4/kernel/model/attribute_view_render.go#L1042-L1078","documentation":"Error \"attribute view snapshot context is ambiguous [%s]\" thrown in siyuan-note/siyuan.","triggerScenarios":"Rendering an attribute view history snapshot whose identifiers match more than one notebook context.","commonSituations":"Occurs when a snapshot restore request matches multiple notebooks or none, so the kernel cannot decide where the attribute view belongs.","solutions":["Provide enough context (notebook/box ID) so the snapshot can be resolved unambiguously.","Avoid passing identifiers that match multiple notebooks or snapshots."],"exampleFix":"Include the notebook ID together with the snapshot reference when requesting the history snapshot render.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"251596fc0de2f9528c00c224252fd073a99973f4","analyzedAt":"2026-08-12T21:18:37.123Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}