{"record":{"id":"87bf1c083781d9b5","repo":"siyuan-note/siyuan","slug":"field-s-not-found-in-view-s","errorCode":null,"errorMessage":"field [%s] not found in view [%s]","messagePattern":"field \\[(.+?)\\] not found in view \\[(.+?)\\]","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/attribute_view.go","lineNumber":1803,"sourceCode":"\t\t\tif field.ID == operation.ID {\n\t\t\t\tfield.FullRow = fullRow\n\t\t\t\tfound = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\tcase av.LayoutTypeKanban:\n\t\tfor _, field := range view.Kanban.Fields {\n\t\t\tif field.ID == operation.ID {\n\t\t\t\tfield.FullRow = fullRow\n\t\t\t\tfound = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\tdefault:\n\t\treturn av.ErrWrongLayoutType\n\t}\n\tif !found {\n\t\treturn fmt.Errorf(\"field [%s] not found in view [%s]\", operation.ID, view.ID)\n\t}\n\n\terr = av.SaveAttributeView(attrView)\n\treturn\n}\n\nfunc getAttrViewOperationView(attrView *av.AttributeView, operation *Operation) (ret *av.View, err error) {\n\tif \"\" != operation.ViewID {\n\t\tret = attrView.GetView(operation.ViewID)\n\t\tif nil == ret {\n\t\t\terr = av.ErrViewNotFound\n\t\t}\n\t\treturn\n\t}\n\treturn getAttrViewViewByBlockID(attrView, operation.BlockID)\n}\n\nfunc getAttrViewOperationNumber(operation *Operation) (ret float64, err error) {","sourceCodeStart":1785,"sourceCodeEnd":1821,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/251596fc0de2f9528c00c224252fd073a99973f4/kernel/model/attribute_view.go#L1785-L1821","documentation":"Returned by setAttrViewColFullRow (attribute_view.go:1803) after iterating the gallery (view.Gallery.CardFields) or kanban (view.Kanban.Fields) field list without finding a field whose ID equals operation.ID. The fullRow flag could not be set because the targeted field (column) is absent from the resolved view. The view itself was resolved successfully via getAttrViewOperationView.","triggerScenarios":"Calling setAttrViewColFullRow with an operation.ID (field/key ID) that does not exist in the current view's field collection — the field was deleted, belongs to a different view, or the ID is stale. Duplicated/renamed fields where the old ID lingers in the UI produce this.","commonSituations":"Field removed from the view but the UI still references the old ID; plugin hard-codes a field ID; layout was switched (table <-> gallery <-> kanban) and the field list was rebuilt with new IDs; mirror view whose fields diverged from the canonical av.","solutions":["Refresh the view's field list before submitting and use a current field ID.","Confirm operation.ID is a field ID from the same view resolved by the operation (operation.ViewID or operation.BlockID), not from a sibling view.","If the field was deleted intentionally, drop the operation rather than retrying."],"exampleFix":"// before: reusing a cached field id\ntransaction({ op: \"setAttrViewColFullRow\", id: cachedFieldID, data: true })\n\n// after: resolve the field id from the live view\nconst view = await fetchAttrViewView(avID, viewID)\nconst field = view.fields.find(f => f.id === wantedKeyID)\nif (!field) return\ntransaction({ op: \"setAttrViewColFullRow\", id: field.id, data: true })","handlingStrategy":"validation","validationCode":"// Confirm the field ID exists in the resolved view before toggling fullRow.\nconst view = await fetchAttrViewView(avID, viewID)\nif (!view.fields.some(f => f.id === operationID)) {\n  throw new Error(`field ${operationID} not found in view ${viewID}`)\n}","typeGuard":"function fieldInView(view: AVView, fieldID: string): boolean {\n  return view.fields.some(f => f.id === fieldID)\n}","tryCatchPattern":null,"preventionTips":["Refresh the view's field list before submitting a fullRow toggle.","Use a field ID from the same view (ViewID/BlockID) the operation resolves.","Drop the operation if the field was deleted rather than retrying."],"tags":["attribute-view","av","gallery","kanban","field","validation","transaction"],"backgroundTag":null,"analyzedSha":"251596fc0de2f9528c00c224252fd073a99973f4","analyzedAt":"2026-08-12T21:18:37.123Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}