{"record":{"id":"c3d5cd5ed408c78a","repo":"siyuan-note/siyuan","slug":"source-document-s-not-found","errorCode":null,"errorMessage":"source document [%s] not found","messagePattern":"source document \\[(.+?)\\] not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/file.go","lineNumber":2674,"sourceCode":"\tret = &ReorderResult{}\n\tif err = validateReorderArgs(sourceIDs, targetID, position); nil != err {\n\t\treturn\n\t}\n\n\tFlushTxQueue()\n\ttarget := treenode.GetBlockTree(targetID)\n\tif !isSortableDocument(target) {\n\t\treturn ret, fmt.Errorf(\"target document [%s] not found\", targetID)\n\t}\n\tbox := Conf.Box(target.BoxID)\n\tif nil == box {\n\t\treturn ret, fmt.Errorf(\"target document [%s] is not in an opened and unlocked notebook\", targetID)\n\t}\n\tparentPath := path.Dir(target.Path)\n\tfor _, sourceID := range sourceIDs {\n\t\tsource := treenode.GetBlockTree(sourceID)\n\t\tif !isSortableDocument(source) {\n\t\t\treturn ret, fmt.Errorf(\"source document [%s] not found\", sourceID)\n\t\t}\n\t\tif source.BoxID != target.BoxID || path.Dir(source.Path) != parentPath {\n\t\t\treturn ret, fmt.Errorf(\"source document [%s] is not a sibling of target document [%s]\", sourceID, targetID)\n\t\t}\n\t}\n\n\tfileTreeSortLock.Lock()\n\tconfPath := filepath.Join(util.DataDir, box.ID, \".siyuan\", \"sort.json\")\n\tfullSortIDs, readErr := readSortConfMap(confPath)\n\tif nil != readErr {\n\t\tfileTreeSortLock.Unlock()\n\t\treturn ret, readErr\n\t}\n\tcurrentIDs, loadErr := loadSiblingCustomOrder(box.ID, parentPath, fullSortIDs)\n\tif nil != loadErr {\n\t\tfileTreeSortLock.Unlock()\n\t\treturn ret, loadErr\n\t}","sourceCodeStart":2656,"sourceCodeEnd":2692,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/8641553a1f07374001902d3ce773285db1292b2d/kernel/model/file.go#L2656-L2692","documentation":"ReorderDocs source guard: one of the source block-tree entries is missing or not a sortable document. A source ID that was deleted, is not a document, or is otherwise unsortable aborts the whole reorder batch.","triggerScenarios":"Thrown at kernel/model/file.go:2674 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Refresh the doc tree so source IDs still exist","Filter out deleted source documents before reordering"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8641553a1f07374001902d3ce773285db1292b2d","analyzedAt":"2026-09-11T16:08:28.414Z","contentChangedAt":"2026-09-11T16:08:28.414Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}