siyuan-note/siyuan · error
Conf.Language(313)
Error message
Conf.Language(313)
What it means
Doc2Heading merges content of the source tree into a tree in another notebook. For encrypted notebooks each notebook has its own DEK (data encryption key); merging across two different notebooks would write content encrypted under the wrong key and corrupt data. The kernel therefore rejects any src/target pair that is not within the same crypto boundary with Conf.Language(313) ('Encrypted notebooks do not support this operation').
Source
Thrown at kernel/model/heading.go:218
logging.LogWarnf("remove empty dir [%s] failed: %s", subDir, removeErr)
}
}
if nil == treenode.GetBlockTree(targetID) {
// 目标块不存在时忽略处理
return
}
targetTree, _ := LoadTreeByBlockID(targetID)
if nil == targetTree {
// 目标块不存在时忽略处理
return
}
// 禁止跨加密边界:Doc2Heading 会合并 srcTree 和 targetTree 的内容,
// 不同加密笔记本各有独立 DEK,跨边界合并会导致密文用错 DEK 损坏数据
if !IsSameCryptoBoundary(srcTree.Box, targetTree.Box) {
err = errors.New(Conf.Language(313))
return
}
pivot := treenode.GetNodeInTree(targetTree, targetID)
if nil == pivot {
err = ErrBlockNotFound
return
}
// 生成文档历史 https://github.com/siyuan-note/siyuan/issues/14359
generateOpTypeHistory(srcTree, HistoryOpUpdate)
// 移动前先删除引用 https://github.com/siyuan-note/siyuan/issues/7819
sql.DeleteRefsTreeQueue(srcTree)
sql.DeleteRefsTreeQueue(targetTree)
if ast.NodeListItem == pivot.Type {
pivot = pivot.LastChildView on GitHub (pinned to 8641553a1f)
Solutions
- Move the document within the same notebook, or convert to heading only when both source and target are in the same notebook
- Decrypt (remove encryption from) the notebooks involved if cross-notebook merging is genuinely needed
- Create a copy of content manually instead of using the merge transaction
Defensive patterns
Strategy: validation
Validate before calling
const boxes = new Set([srcBoxID, targetBoxID]);
// only merge within the same notebook (or same crypto boundary)
if (srcBoxID !== targetBoxID) throw new Error('cross-notebook merge not allowed for encrypted notebooks'); Try / catch
try {
await fetchPost('/api/filetree/doc2Heading', {srcID, targetID});
} catch (e) {
if (String(e.msg).includes('do not support this operation')) {
// fall back to moving the document instead of merging
} else throw e;
} Prevention
- Restrict doc2Heading UI actions to same-notebook targets
- Never assume encrypted and plain notebooks are interchangeable for merge operations
- Check IsSameCryptoBoundary-equivalent conditions (same notebook) client-side
When it happens
Trigger: Calling Doc2Heading where srcTree.Box and targetTree.Box are different notebooks and at least one (or the pair) crosses an encrypted-notebook boundary, i.e. IsSameCryptoBoundary(srcBox, targetBox) is false.
Common situations: Drag-dropping a doc from an encrypted notebook onto a heading in a normal notebook (or between two different encrypted notebooks); automation that moves docs between notebooks.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Query asset failed [%s]
- Encrypted notebooks do not support this operation
- Encrypted notebooks do not support this operation
- Please unlock the encrypted notebook first
- ErrInvalidBoxID
AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11).
Data as JSON: /api/errors/a74cefc3dc8a0437.
Report an issue: GitHub.