{"record":{"id":"36cddc46638a9f78","repo":"siyuan-note/siyuan","slug":"conf-language-15-blockial","errorCode":null,"errorMessage":"Conf.Language(15)","messagePattern":"Conf\\.Language\\(15\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/blockial.go","lineNumber":100,"sourceCode":"\tif \"0\" != timed {\n\t\tt, e := dateparse.ParseIn(timed, time.Now().Location())\n\t\tif nil != e {\n\t\t\treturn e\n\t\t}\n\t\ttimedMills = t.UnixMilli()\n\t}\n\n\tFlushTxQueue()\n\n\tattrs := sql.GetBlockAttrs(id)\n\ttree, err := LoadTreeByBlockID(id)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tnode := treenode.GetNodeInTree(tree, id)\n\tif nil == node {\n\t\treturn fmt.Errorf(Conf.Language(15), id)\n\t}\n\n\tif ast.NodeDocument != node.Type && node.IsContainerBlock() {\n\t\tnode = treenode.FirstLeafBlock(node)\n\t}\n\n\tcontent := sql.NodeStaticContent(node, nil, false, false, false)\n\tcontent = gulu.Str.SubStr(content, 128)\n\tcontent = strings.ReplaceAll(content, editor.Zwsp, \"\")\n\terr = SetCloudBlockReminder(id, content, timedMills)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tattrName := \"custom-reminder-wechat\"\n\tif \"0\" == timed {\n\t\tdelete(attrs, attrName)\n\t\told := node.IALAttr(attrName)","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/model/blockial.go#L82-L118","documentation":"SetBlockReminder cannot find the target block node in the document tree after loading the block's file, so it returns Conf.Language(15): 'Content block with id [%s] not found', interpolated with the offending id. This happens after the subscription check passes, when the id does not resolve to a node (treenode.GetNodeInTree returned nil).","triggerScenarios":"POST /api/block/setBlockReminder with an id that is not a valid/existing block: malformed id, deleted block, id from another workspace, or a document id whose .sy file failed to load (tree loaded but node nil).","commonSituations":"Stale ids cached in a plugin after the block was deleted; using a notebook (box) id instead of a block id; automated tests reusing ids from a rebuilt dataset; case-sensitivity or whitespace mistakes when copying ids.","solutions":["Verify the id with /api/block/getBlockInfo (or getBlockKramdown) before setting the reminder","Fetch a fresh block id via /api/filetree/getDoc or SQL query (/api/query/sql) instead of a cached one","Confirm the block still exists in the current workspace/notebook; deleted blocks cannot receive reminders","Check the id format: it must be a 14/22-char SiYuan block id without surrounding whitespace"],"exampleFix":"// before\nawait fetchPost('/api/block/setBlockReminder', {id: cachedId, timed});\n// after\nconst info = await fetchSyncPost('/api/block/getBlockInfo', {id: cachedId});\nif (info.code !== 0) { showMessage('block ' + cachedId + ' not found'); return; }\nawait fetchPost('/api/block/setBlockReminder', {id: cachedId, timed});","handlingStrategy":"validation","validationCode":"const info = await fetchSyncPost('/api/block/getBlockInfo', {id});\nif (info.code !== 0) throw new Error('block not found: ' + id);","typeGuard":"null","tryCatchPattern":"try { await setBlockReminder(id, timed); } catch (e) { if (/not found|未找到/.test(String(e))) refreshBlockId(id); else throw e; }","preventionTips":["Always resolve ids via getBlockInfo or SQL immediately before use","Never cache block ids across data rebuilds or syncs","Trim whitespace from ids read from user input or files","Confirm the id is a block id, not a box or notebook id"],"tags":["siyuan","block-id","not-found","reminder"],"backgroundTag":"record-not-found","analyzedSha":"9f775e8a12daef8255556097396f9b2739078892","analyzedAt":"2026-09-19T03:17:15.984Z","contentChangedAt":"2026-09-19T03:17:15.984Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}