siyuan-note/siyuan · error
bind attribute view item [%s] failed: %w
Error message
bind attribute view item [%s] failed: %w
What it means
Error "bind attribute view item [%s] failed: %w" thrown in siyuan-note/siyuan.
Source
Thrown at kernel/model/attribute_view_new_item.go:243
cleanupCreatedDocs := func() error {
var cleanupErr error
for i := len(items) - 1; 0 <= i; i-- {
if "" != items[i].docID {
cleanupErr = errors.Join(cleanupErr, removeCreatedNewItemDoc(items[i].docID))
}
}
return cleanupErr
}
for _, item := range items {
item.docID, item.tree, err = createAttributeViewItemDocument(item.preview, itemTemplate)
if nil != err {
return nil, newItemCreationError(err, cleanupCreatedDocs())
}
icon, _ := getNodeAvBlockText(item.tree.Root, "")
item.bound, err = newBoundAttributeViewItemValue(item.original, item.docID, icon)
if nil != err {
return nil, newItemCreationError(fmt.Errorf("bind attribute view item [%s] failed: %w", item.itemID, err), cleanupCreatedDocs())
}
ret.ItemIDs = append(ret.ItemIDs, item.itemID)
ret.BlockIDs = append(ret.BlockIDs, item.docID)
}
var doOperations, undoOperations []*Operation
for _, item := range items {
doOperations = append(doOperations,
&Operation{Action: "restoreCreatedDoc", ID: item.docID, Tree: item.tree},
&Operation{
Action: "replaceAttrViewBlock", AvID: avID, BlockID: blockID, PreviousID: item.itemID, NextID: item.docID,
IsDetached: false,
},
&Operation{
Action: "updateAttrViewCell", ID: item.bound.ID, AvID: avID, KeyID: item.bound.KeyID,
RowID: item.itemID, Data: item.bound,
},
)View on GitHub (pinned to 251596fc0d)
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.
Example fix
Re-create the row so a fresh block is generated, or restore the missing block from history, then retry.
When it happens
Trigger: Creating or duplicating a database row when writing the row's block attributes back to the document fails.
Common situations: 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.
AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12).
Data as JSON: /api/errors/90cdcd68dcca9671.
Report an issue: GitHub.