siyuan-note/siyuan · error
Conf.Language(381)
Error message
Conf.Language(381)
What it means
Returned by validateAttributeViewBinding when the target attribute view exists, but its notebook (boxID) and the transaction's source tree.Box sit on different crypto boundaries — i.e. the operation would move or bind a block across notebooks whose encryption setups differ, which is not permitted for databases. The message is the localized i18n string 381 explaining the cross-notebook encryption restriction.
Solutions
- Move the block within the same notebook that owns the attribute view, or move the database itself first
- Align encryption settings (both notebooks encrypted or both plaintext) before cross-notebook operations
- Update SiYuan so the encrypted-notebook feature set matches across the notebooks involved
- Use export/import of content instead of direct binding when crossing crypto boundaries
Defensive patterns
Strategy: validation
Validate before calling
if (!isSameCryptoBoundary(targetBoxID, sourceBoxID)) {
throw new Error('cannot bind blocks across notebooks with different encryption settings');
} Try / catch
try {
await api.bindBlockAv(payload);
} catch (e) {
if (e.msg && e.msg.indexOf(i18n[381]) !== -1) {
showDialog('Move the block within the same notebook, or align notebook encryption settings');
}
} Prevention
- Keep databases in the same notebook as the blocks that bind to them
- Check notebook encryption status before cross-notebook moves
- Align encryption settings across notebooks before bulk migrations
- Use move-in-notebook operations instead of cross-notebook drag for bound blocks
When it happens
Trigger: addAttributeViewBlocks, replaceAttributeViewBlock, bindBlockAv, or updateAttributeViewValue where IsSameCryptoBoundary(boxID, tree.Box) is false: e.g. moving a block referencing an attribute view from a plaintext notebook into an encrypted notebook (or vice versa), or binding a block to a database that lives in a notebook with a different key envelope.
Common situations: Cross-notebook drag-and-drop of blocks bound to a database; bulk migrations combining encrypted and unencrypted notebooks; scripts moving blocks between notebooks without checking encryption settings; older workspaces partially upgraded to encrypted notebooks.
Related errors
- database [ ] moved across notebook encryption boundaries
- encrypted blocktree db not opened for box
- encrypted box db not opened for box
- encrypted box db not opened for box
- encrypted database history has no notebook context
AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19).
Data as JSON: /api/errors/36d6df8f14312c56.
Report an issue: GitHub.
Appendix: source
Thrown at kernel/model/attribute_view_binding.go:86
ret = treenode.GetBlockTree(blockID)
}
if ret == nil || !IsSameCryptoBoundary(boxID, ret.BoxID) {
return nil
}
return ret
}
// validateAttributeViewBinding 在修改条目和块属性前校验绑定目标,允许事务中尚未入索引的新块。
func validateAttributeViewBinding(avID string, tree *parse.Tree) error {
if tree == nil {
return ErrBlockNotFound
}
avPath, boxID := av.FindAttributeViewPath(avID)
if avPath == "" {
return av.ErrAttributeViewNotFound
}
if !IsSameCryptoBoundary(boxID, tree.Box) {
return errors.New(Conf.Language(381))
}
return nil
}
View on GitHub (pinned to 9f775e8a12)