siyuan-note/siyuan · error

Conf.Language(15)

Error message

Conf.Language(15)

What it means

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).

Solutions

  1. Verify the id with /api/block/getBlockInfo (or getBlockKramdown) before setting the reminder
  2. Fetch a fresh block id via /api/filetree/getDoc or SQL query (/api/query/sql) instead of a cached one
  3. Confirm the block still exists in the current workspace/notebook; deleted blocks cannot receive reminders
  4. Check the id format: it must be a 14/22-char SiYuan block id without surrounding whitespace

Example fix

// before
await fetchPost('/api/block/setBlockReminder', {id: cachedId, timed});
// after
const info = await fetchSyncPost('/api/block/getBlockInfo', {id: cachedId});
if (info.code !== 0) { showMessage('block ' + cachedId + ' not found'); return; }
await fetchPost('/api/block/setBlockReminder', {id: cachedId, timed});
Defensive patterns

Strategy: validation

Validate before calling

const info = await fetchSyncPost('/api/block/getBlockInfo', {id});
if (info.code !== 0) throw new Error('block not found: ' + id);

Type guard

null

Try / catch

try { await setBlockReminder(id, timed); } catch (e) { if (/not found|未找到/.test(String(e))) refreshBlockId(id); else throw e; }

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19). Data as JSON: /api/errors/36cddc46638a9f78. Report an issue: GitHub.

Appendix: source

Thrown at kernel/model/blockial.go:100

	if "0" != timed {
		t, e := dateparse.ParseIn(timed, time.Now().Location())
		if nil != e {
			return e
		}
		timedMills = t.UnixMilli()
	}

	FlushTxQueue()

	attrs := sql.GetBlockAttrs(id)
	tree, err := LoadTreeByBlockID(id)
	if err != nil {
		return
	}

	node := treenode.GetNodeInTree(tree, id)
	if nil == node {
		return fmt.Errorf(Conf.Language(15), id)
	}

	if ast.NodeDocument != node.Type && node.IsContainerBlock() {
		node = treenode.FirstLeafBlock(node)
	}

	content := sql.NodeStaticContent(node, nil, false, false, false)
	content = gulu.Str.SubStr(content, 128)
	content = strings.ReplaceAll(content, editor.Zwsp, "")
	err = SetCloudBlockReminder(id, content, timedMills)
	if err != nil {
		return
	}

	attrName := "custom-reminder-wechat"
	if "0" == timed {
		delete(attrs, attrName)
		old := node.IALAttr(attrName)

View on GitHub (pinned to 9f775e8a12)