{"record":{"id":"d0ba1a9c869e653b","repo":"siyuan-note/siyuan","slug":"symbolic-attribute-view-is-not-supported-s","errorCode":null,"errorMessage":"symbolic attribute view is not supported: %s","messagePattern":"symbolic attribute view is not supported: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/asset_relink.go","lineNumber":302,"sourceCode":"\tentries, err := os.ReadDir(dir)\n\tif err != nil && !os.IsNotExist(err) {\n\t\treturn err\n\t}\n\tfor _, entry := range entries {\n\t\tif err := p.checkContext(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tid := strings.TrimSuffix(entry.Name(), \".json\")\n\t\tif entry.IsDir() || !strings.HasSuffix(entry.Name(), \".json\") || !ast.IsNodeIDPattern(id) {\n\t\t\tcontinue\n\t\t}\n\t\tabs := filepath.Join(dir, entry.Name())\n\t\tif err = p.observe(abs); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tp.reportProgress(abs)\n\t\tif entry.Type()&os.ModeSymlink != 0 {\n\t\t\treturn fmt.Errorf(\"symbolic attribute view is not supported: %s\", id)\n\t\t}\n\t\tif err = validateRelinkStoragePath(abs); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdata, err := filelock.ReadFile(abs)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif util.IsCiphertext(data) {\n\t\t\treturn fmt.Errorf(\"encrypted attribute view in global storage: %s\", id)\n\t\t}\n\t\tif !json.Valid(data) {\n\t\t\treturn fmt.Errorf(\"invalid attribute view JSON: %s\", id)\n\t\t}\n\t\tif !p.mayContainReferences(data) {\n\t\t\tcontinue\n\t\t}\n\t\tp.parsedViews++","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/model/asset_relink.go#L284-L320","documentation":"scanViews iterates the global storage/av directory of attribute-view (database) definitions. Symlinked .json definition files are rejected because relinking must operate on real in-data files; a symlink could point outside the data directory or be retargeted, breaking the invariant that scanned files are regular files inside the workspace.","triggerScenarios":"During scan (via scanViews), a file like storage/av/20240101120000-abc123.json is a symbolic link instead of a regular file.","commonSituations":"A user manually symlinked AV definitions between workspaces to 'share' databases; a sync tool replaced files with symlinks; a backup/restore process materialized entries as symlinks.","solutions":["Remove the symlink and replace it with a real copy of the target .json file","Re-sync the workspace from the authoritative source so real files are restored","Check backup/restore tooling so symlinks are dereferenced into regular files"],"exampleFix":"// before\n// storage/av/20240101120000-abc123.json -> /external/db.json (symlink)\n// after\nos.Remove(\"data/storage/av/20240101120000-abc123.json\")\nfilelock.WriteFile(\"data/storage/av/20240101120000-abc123.json\", realContent)","handlingStrategy":"validation","validationCode":"// detect symlinks under storage/av before relinking\nentries, _ := os.ReadDir(filepath.Join(dataDir, \"storage\", \"av\"))\nfor _, e := range entries {\n\tif e.Type()&os.ModeSymlink != 0 {\n\t\t// resolve or remove the symlink first\n\t}\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never symlink files inside data/storage/av; copy real files instead","Configure sync/backup tools to dereference symlinks","Periodically scan the workspace for symlinks under data/"],"tags":["symlink","attribute-view","storage","security"],"backgroundTag":"unsupported-operation","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"}