{"record":{"id":"f68568b5b4ca4aba","repo":"siyuan-note/siyuan","slug":"attribute-view-group-s-not-found","errorCode":null,"errorMessage":"attribute view group [%s] not found","messagePattern":"attribute view group \\[(.+?)\\] not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/attribute_view_render.go","lineNumber":303,"sourceCode":"\tviewable, attrView, err := RenderAttributeView(blockID, avID, viewID, query, 1, math.MaxInt, nil, false, false)\n\tif nil != err {\n\t\treturn nil, nil, err\n\t}\n\n\ttable, ok := viewable.(*av.Table)\n\tif !ok {\n\t\treturn nil, nil, fmt.Errorf(\"attribute view [%s] is not a table\", avID)\n\t}\n\tif \"\" != groupID {\n\t\tvar groupTable *av.Table\n\t\tfor _, group := range table.Groups {\n\t\t\tif group.GetID() == groupID {\n\t\t\t\tgroupTable, _ = group.(*av.Table)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif nil == groupTable {\n\t\t\treturn nil, nil, fmt.Errorf(\"attribute view group [%s] not found\", groupID)\n\t\t}\n\t\ttable = groupTable\n\t}\n\n\trows, err := getAttributeViewPasteRowsFromTable(table, startItemID, count)\n\tif nil != err {\n\t\treturn nil, nil, err\n\t}\n\ttable.Rows = rows\n\treturn table, getPasteInferableAttributeViewKeyIDs(attrView, getDependentRollupKeyIDs(attrView.ID)), nil\n}\n\nfunc getPasteInferableAttributeViewKeyIDs(attrView *av.AttributeView, dependentRollupKeyIDs map[string]struct{}) (ret []string) {\n\tunsafeKeyIDs := dependentRollupKeyIDs\n\tif nil == unsafeKeyIDs {\n\t\tunsafeKeyIDs = map[string]struct{}{}\n\t}\n\tfor _, itemTemplate := range attrView.NewItemTemplates {","sourceCodeStart":285,"sourceCodeEnd":321,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/model/attribute_view_render.go#L285-L321","documentation":"When a groupID is supplied, GetAttributeViewPasteRows iterates the table view's groups to find the matching one and narrows it to *av.Table. If no group's ID equals groupID (or the matched group is not a Table), groupTable stays nil and this error is returned.","triggerScenarios":"Calling GetAttributeViewPasteRows with a groupID that no longer exists in the table view (group deleted/renamed) or that is not table-backed; stale groupID captured before regrouping.","commonSituations":"Paste target recorded before the user re-grouped the view, invalidating the old group ID; plugin passing a block ID instead of a group ID; grouped view where group IDs changed after data edit.","solutions":["Re-read the current view's group list and use a valid group ID (or the group containing the start item)","Omit/empty groupID if the paste target is not inside a specific group","Refresh the frontend state so cached group IDs are re-fetched before pasting"],"exampleFix":"// before\nrows, _, err := model.GetAttributeViewPasteRows(avID, viewID, oldGroupID, startID, 1)\n// after\ngroupID := findGroupIDForItem(avID, viewID, startID) // re-resolve from current groups\nrows, _, err := model.GetAttributeViewPasteRows(avID, viewID, groupID, startID, 1)","handlingStrategy":"validation","validationCode":"const group = table.groups?.find(g => g.id === groupID)\nif (!group) { throw new Error(`group ${groupID} not in current view`) }","typeGuard":null,"tryCatchPattern":"rows, _, err := model.GetAttributeViewPasteRows(avID, viewID, groupID, startID, n)\nif err != nil && strings.Contains(err.Error(), \"group [\") && strings.Contains(err.Error(), \"] not found\") {\n    groupID = recomputeGroupID(avID, viewID, startID)\n}","preventionTips":["Re-resolve group IDs after any regrouping operation","Never cache group IDs across data edits","Distinguish group IDs from block IDs at call sites"],"tags":["grouping","not-found","paste"],"backgroundTag":"entity-not-found","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"}