{"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":"validation","errorClass":null,"httpStatus":null,"severity":"warning","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/251596fc0de2f9528c00c224252fd073a99973f4/kernel/av/av.go#L1283-L1313","documentation":"Sentinel ErrSpecTooNew (AV overload). Returned by CheckSpec (av/av_fix.go:48) when an AV JSON carries a Spec field greater than CurrentSpec (7), and by parseAttributeViewSearchInfo which calls CheckSpec on the parsed spec. It means the AV was written by a newer SiYuan than the running kernel can read.","triggerScenarios":"Opening/syncing a workspace created or last saved by a newer SiYuan version into an older kernel. The AV JSON's spec field (e.g. 8) exceeds this kernel's CurrentSpec (7), so the kernel refuses to interpret it to avoid corruption.","commonSituations":"User downgraded SiYuan; opened a synced workspace from a newer desktop build on an older mobile build; CI testing against an older kernel with data produced by a newer one.","solutions":["Upgrade the running SiYuan kernel to a version whose CurrentSpec is >= the AV's spec, then re-open.","If upgrading is impossible, re-create the database in the older version (data written by the older version will have a compatible spec).","Do not manually lower the spec field — that can leave the AV in an inconsistent state.","Check the API surface: api/av.go:1324 maps this to a user-facing message for the frontend."],"exampleFix":"// before\n// workspace saved by SiYuan spec-8, opened in spec-7 kernel -> spec too new\n\n// after: upgrade the kernel\n//   install a SiYuan build whose av.CurrentSpec >= AV.Spec, then reopen the workspace\n// (no code change; this is a version-compatibility issue)","handlingStrategy":"fallback","validationCode":"// Detect incompatibility before opening\nif avSpec > av.CurrentSpec {\n    return fmt.Errorf(\"AV spec %d > kernel %d; upgrade required\", avSpec, av.CurrentSpec)\n}","typeGuard":null,"tryCatchPattern":"if _, err := av.ParseAttributeView(avID); errors.Is(err, av.ErrSpecTooNew) {\n    // tell the user to upgrade; do not attempt to edit the AV\n    return upgradeRequiredError()\n}","preventionTips":["Keep all clients/kernels on the same or newer SiYuan version as the workspace author.","Do not downgrade SiYuan below the version that wrote the workspace's highest-spec AV.","Never manually edit the spec field in AV JSON to force compatibility."],"tags":["attribute-view","version","spec","compatibility"],"backgroundTag":null,"analyzedSha":"251596fc0de2f9528c00c224252fd073a99973f4","analyzedAt":"2026-08-12T21:18:37.123Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}