{"record":{"id":"39e10de329cdb2d6","repo":"siyuan-note/siyuan","slug":"target-document-s-not-found","errorCode":null,"errorMessage":"target document [%s] not found","messagePattern":"target document \\[(.+?)\\] not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/file.go","lineNumber":2664,"sourceCode":"\n// ReorderResult 描述相对排序操作的结果。\ntype ReorderResult struct {\n\tChanged    bool   `json:\"changed\"`\n\tNotebook   string `json:\"notebook,omitempty\"`\n\tParentPath string `json:\"parentPath,omitempty\"`\n}\n\n// ReorderDocs 将同级文档移动到目标文档之前或之后。\nfunc ReorderDocs(sourceIDs []string, targetID, position string) (ret *ReorderResult, err error) {\n\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\")","sourceCodeStart":2646,"sourceCodeEnd":2682,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/8641553a1f07374001902d3ce773285db1292b2d/kernel/model/file.go#L2646-L2682","documentation":"ReorderDocs target guard: the target block-tree entry is missing or not a sortable document (isSortableDocument false — deleted, non-document, or non-sortable). The drag target for the document reorder cannot be used.","triggerScenarios":"Thrown at kernel/model/file.go:2664 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Refresh the doc tree UI so the target still exists","Verify targetID is a document block, not a content block"],"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"}