{"record":{"id":"3cb5ba47f2572b00","repo":"siyuan-note/siyuan","slug":"invalid-paste-row-count-d","errorCode":null,"errorMessage":"invalid paste row count [%d]","messagePattern":"invalid paste row count \\[(.+?)\\]","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/attribute_view_render.go","lineNumber":376,"sourceCode":"\tret = map[string]struct{}{}\n\tfor _, attrView := range attrViews {\n\t\tif nil == attrView {\n\t\t\tcontinue\n\t\t}\n\t\tfor _, keyValues := range attrView.KeyValues {\n\t\t\tif nil == keyValues || nil == keyValues.Key || av.KeyTypeRollup != keyValues.Key.Type ||\n\t\t\t\tnil == keyValues.Key.Rollup || \"\" == keyValues.Key.Rollup.KeyID {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tret[keyValues.Key.Rollup.KeyID] = struct{}{}\n\t\t}\n\t}\n\treturn\n}\n\nfunc getAttributeViewPasteRowsFromTable(table *av.Table, startItemID string, count int) (rows []*av.TableRow, err error) {\n\tif count < 1 {\n\t\treturn nil, fmt.Errorf(\"invalid paste row count [%d]\", count)\n\t}\n\tstart := -1\n\tfor i, row := range table.Rows {\n\t\tif row.ID == startItemID {\n\t\t\tstart = i\n\t\t\tbreak\n\t\t}\n\t}\n\tif 0 > start {\n\t\treturn nil, fmt.Errorf(\"attribute view item [%s] not found\", startItemID)\n\t}\n\tend := start + min(count, len(table.Rows)-start)\n\treturn table.Rows[start:end], nil\n}\n\nfunc RenderAttributeViewWithTarget(blockID, avID, viewID, query string, page, pageSize int, groupPaging map[string]any, initialLayout av.LayoutType, createIfNotExist, ignoreRows bool, targetItemID, targetGroupID string) (viewable av.Viewable, attrView *av.AttributeView, target *AttributeViewRenderTarget, err error) {\n\tif !ast.IsNodeIDPattern(avID) {\n\t\terr = ErrInvalidID","sourceCodeStart":358,"sourceCodeEnd":394,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/251596fc0de2f9528c00c224252fd073a99973f4/kernel/model/attribute_view_render.go#L358-L394","documentation":"Error \"invalid paste row count [%d]\" thrown in siyuan-note/siyuan.","triggerScenarios":"Pasting into a table view with a row count that is zero, negative, or otherwise invalid.","commonSituations":"Occurs when pasting clipboard data whose row count is zero or negative into a table view.","solutions":["Paste a positive, reasonable number of rows; the clipboard payload must decode to at least one valid row.","Ensure the clipboard content actually came from an attribute view row copy."],"exampleFix":"Copy rows again from the source table and paste into the target database view.","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"}