{"record":{"id":"9a75b54dac4983a4","repo":"siyuan-note/siyuan","slug":"attribute-view-spec-is-too-new","errorCode":null,"errorMessage":"attribute view spec is too new","messagePattern":"attribute view spec is too new","errorType":"http","errorClass":"ErrSpecTooNew","httpStatus":null,"severity":"error","filePath":"kernel/av/av.go","lineNumber":1301,"sourceCode":"\t\t}\n\t}\n\treturn\n}\n\nfunc GetAttributeViewI18n(key string) string {\n\treturn util.AttrViewLangs[util.Lang][key].(string)\n}\n\nvar (\n\tErrAttributeViewNotFound  = errors.New(\"attribute view not found\")\n\tErrInvalidAttributeViewID = errors.New(\"invalid attribute view id\")\n\tErrInvalidBoxID           = errors.New(\"invalid box id\")\n\tErrViewNotFound           = errors.New(\"view not found\")\n\tErrKeyNotFound            = errors.New(\"key not found\")\n\tErrItemNotFound           = errors.New(\"item not found\")\n\tErrWrongLayoutType        = errors.New(\"wrong layout type\")\n\tErrInvalidColumnAlign     = errors.New(\"invalid column align\")\n\tErrSpecTooNew             = errors.New(\"attribute view spec is too new\")\n\tErrFilterTooDeep          = errors.New(\"filter nesting depth exceeds the maximum allowed\")\n)\n\nconst (\n\tNodeAttrNameAvs        = \"custom-avs\"                 // 用于标记块所属的属性视图，逗号分隔 av id\n\tNodeAttrView           = \"custom-sy-av-view\"          // 用于标记块所属的属性视图视图 view id Database block support specified view https://github.com/siyuan-note/siyuan/issues/10443\n\tNodeAttrVisibleViewIDs = \"custom-sy-av-visible-views\" // 用于标记数据库块显示的视图 ID，逗号分隔\n\tNodeAttrViewStaticText = \"custom-sy-av-s-text\"        // 用于标记块所属的属性视图静态文本 Database-bound block primary key supports setting static anchor text https://github.com/siyuan-note/siyuan/issues/10049\n\n\tNodeAttrViewNames = \"av-names\" // 用于临时标记块所属的属性视图名称，空格分隔\n)\n","sourceCodeStart":1283,"sourceCodeEnd":1313,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/afa823b6b4e4f183511e0bc0a3be93caa94c7c97/kernel/av/av.go#L1283-L1313","documentation":"ErrSpecTooNew is returned by av.CheckSpec (kernel/av/av_fix.go:44-49) when an attribute-view JSON carries av.Spec greater than CurrentSpec (currently 7). Each spec bump is a one-way data migration; a newer kernel wrote the file, so this older kernel cannot safely interpret it.","triggerScenarios":"Opening a database created or migrated by a newer SiYuan after downgrading the app; opening a synced workspace whose .av.json was upgraded by a newer client on another device; ParseAttributeView / render paths calling CheckSpec (kernel/api/av.go:1365 maps it to the localized message 215: 'Cannot open database view created by a newer version. Please upgrade to the latest version and try again').","commonSituations":"User downgrades to an older AppImage/installer; mixed versions across devices on the same sync repo; testing an export bundle produced by a beta build on a stable build.","solutions":["Upgrade SiYuan to at least the version that wrote the file (the spec number increases monotonically with migrations upgradeSpec1..upgradeSpec7 in kernel/av/av_fix.go)","If upgrading is impossible, restore the .av.json from history (kernel/history.db snapshots) or from a data-repo snapshot taken before the upgrade","Avoid mixed-version sync: upgrade all clients of the same workspace before editing databases"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"attrView, err := av.ParseAttributeView(avID)\nif err == nil {\n    if err := av.CheckSpec(attrView); errors.Is(err, av.ErrSpecTooNew) {\n        // refuse to edit; prompt upgrade, offer history restore\n    }\n}","typeGuard":"func isSpecTooNew(err error) bool {\n    return errors.Is(err, av.ErrSpecTooNew)\n}","tryCatchPattern":null,"preventionTips":["Keep all clients of one sync workspace on the same or newer SiYuan version","Never edit databases while running an older build than the one that last saved them","Surface the kernel's localized message (language key 215) so users know to upgrade rather than retry"],"tags":["siyuan","attribute-view","version","migration","spec","go"],"backgroundTag":"data-format-version-too-new","analyzedSha":"afa823b6b4e4f183511e0bc0a3be93caa94c7c97","analyzedAt":"2026-08-18T17:04:10.865Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}