{"record":{"id":"90cdcd68dcca9671","repo":"siyuan-note/siyuan","slug":"bind-attribute-view-item-s-failed-w","errorCode":null,"errorMessage":"bind attribute view item [%s] failed: %w","messagePattern":"bind attribute view item \\[(.+?)\\] failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/attribute_view_new_item.go","lineNumber":243,"sourceCode":"\n\tcleanupCreatedDocs := func() error {\n\t\tvar cleanupErr error\n\t\tfor i := len(items) - 1; 0 <= i; i-- {\n\t\t\tif \"\" != items[i].docID {\n\t\t\t\tcleanupErr = errors.Join(cleanupErr, removeCreatedNewItemDoc(items[i].docID))\n\t\t\t}\n\t\t}\n\t\treturn cleanupErr\n\t}\n\tfor _, item := range items {\n\t\titem.docID, item.tree, err = createAttributeViewItemDocument(item.preview, itemTemplate)\n\t\tif nil != err {\n\t\t\treturn nil, newItemCreationError(err, cleanupCreatedDocs())\n\t\t}\n\t\ticon, _ := getNodeAvBlockText(item.tree.Root, \"\")\n\t\titem.bound, err = newBoundAttributeViewItemValue(item.original, item.docID, icon)\n\t\tif nil != err {\n\t\t\treturn nil, newItemCreationError(fmt.Errorf(\"bind attribute view item [%s] failed: %w\", item.itemID, err), cleanupCreatedDocs())\n\t\t}\n\t\tret.ItemIDs = append(ret.ItemIDs, item.itemID)\n\t\tret.BlockIDs = append(ret.BlockIDs, item.docID)\n\t}\n\n\tvar doOperations, undoOperations []*Operation\n\tfor _, item := range items {\n\t\tdoOperations = append(doOperations,\n\t\t\t&Operation{Action: \"restoreCreatedDoc\", ID: item.docID, Tree: item.tree},\n\t\t\t&Operation{\n\t\t\t\tAction: \"replaceAttrViewBlock\", AvID: avID, BlockID: blockID, PreviousID: item.itemID, NextID: item.docID,\n\t\t\t\tIsDetached: false,\n\t\t\t},\n\t\t\t&Operation{\n\t\t\t\tAction: \"updateAttrViewCell\", ID: item.bound.ID, AvID: avID, KeyID: item.bound.KeyID,\n\t\t\t\tRowID: item.itemID, Data: item.bound,\n\t\t\t},\n\t\t)","sourceCodeStart":225,"sourceCodeEnd":261,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/251596fc0de2f9528c00c224252fd073a99973f4/kernel/model/attribute_view_new_item.go#L225-L261","documentation":"Error \"bind attribute view item [%s] failed: %w\" thrown in siyuan-note/siyuan.","triggerScenarios":"Creating or duplicating a database row when writing the row's block attributes back to the document fails.","commonSituations":"Occurs when a cloned attribute view row cannot be bound to its new block, usually after a partial clone failure or a conflicting block ID.","solutions":["Ensure the item's block still exists in the document before binding it to the attribute view row.","Inspect the wrapped error in the kernel log to identify which bind step failed."],"exampleFix":"Re-create the row so a fresh block is generated, or restore the missing block from history, then retry.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"251596fc0de2f9528c00c224252fd073a99973f4","analyzedAt":"2026-08-12T21:18:37.123Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}