{"record":{"id":"36d6df8f14312c56","repo":"siyuan-note/siyuan","slug":"conf-language-381","errorCode":null,"errorMessage":"Conf.Language(381)","messagePattern":"Conf\\.Language\\(381\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/attribute_view_binding.go","lineNumber":86,"sourceCode":"\t\tret = treenode.GetBlockTree(blockID)\n\t}\n\tif ret == nil || !IsSameCryptoBoundary(boxID, ret.BoxID) {\n\t\treturn nil\n\t}\n\treturn ret\n}\n\n// validateAttributeViewBinding 在修改条目和块属性前校验绑定目标，允许事务中尚未入索引的新块。\nfunc validateAttributeViewBinding(avID string, tree *parse.Tree) error {\n\tif tree == nil {\n\t\treturn ErrBlockNotFound\n\t}\n\tavPath, boxID := av.FindAttributeViewPath(avID)\n\tif avPath == \"\" {\n\t\treturn av.ErrAttributeViewNotFound\n\t}\n\tif !IsSameCryptoBoundary(boxID, tree.Box) {\n\t\treturn errors.New(Conf.Language(381))\n\t}\n\treturn nil\n}\n","sourceCodeStart":68,"sourceCodeEnd":90,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/model/attribute_view_binding.go#L68-L90","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (!isSameCryptoBoundary(targetBoxID, sourceBoxID)) {\n  throw new Error('cannot bind blocks across notebooks with different encryption settings');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await api.bindBlockAv(payload);\n} catch (e) {\n  if (e.msg && e.msg.indexOf(i18n[381]) !== -1) {\n    showDialog('Move the block within the same notebook, or align notebook encryption settings');\n  }\n}","preventionTips":["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"],"tags":["database","encryption","notebook-boundary","binding"],"backgroundTag":"incompatible-crypto-boundary","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"}