{"record":{"id":"a0b56738efbe4a02","repo":"siyuan-note/siyuan","slug":"unsupported-attribute-view-rich-text-node-s","errorCode":null,"errorMessage":"unsupported attribute view rich text node [%s]","messagePattern":"unsupported attribute view rich text node \\[(.+?)\\]","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/av/value.go","lineNumber":607,"sourceCode":"\t}\n\terr = validateValueTextRichTreeWithImages(tree, images)\n\treturn\n}\n\nfunc validateValueTextRichTree(tree *parse.Tree) (err error) {\n\treturn validateValueTextRichTreeWithImages(tree, false)\n}\n\nfunc validateValueTextRichTreeWithImages(tree *parse.Tree, images bool) (err error) {\n\tif nil == tree || nil == tree.Root {\n\t\treturn fmt.Errorf(\"attribute view rich text tree is missing\")\n\t}\n\tast.Walk(tree.Root, func(node *ast.Node, entering bool) ast.WalkStatus {\n\t\tif !entering {\n\t\t\treturn ast.WalkContinue\n\t\t}\n\t\tif !isAllowedValueTextRichNode(node) && !(images && isAllowedTableCellRichImageNode(node)) {\n\t\t\terr = fmt.Errorf(\"unsupported attribute view rich text node [%s]\", node.Type.String())\n\t\t\treturn ast.WalkStop\n\t\t}\n\t\treturn ast.WalkContinue\n\t})\n\treturn\n}\n\n// newValueTextRichLute 固定启用存储格式支持的语法，避免编辑器开关变化后重解释既有数据。\nfunc newValueTextRichLute() *lute.Lute {\n\tret := lute.New()\n\tret.SetTextMark(true)\n\tret.SetEmoji(false)\n\tret.SetProtyleWYSIWYG(true)\n\tret.SetBlockRef(true)\n\tret.SetFileAnnotationRef(true)\n\tret.SetKramdownIAL(true)\n\tret.SetHTMLTag2TextMark(true)\n\tret.SetSuperBlock(true)","sourceCodeStart":589,"sourceCodeEnd":625,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/av/value.go#L589-L625","documentation":"The AST walker found a node whose type is not in the whitelist (isAllowedValueTextRichNode) and, for table cells with images enabled, also not in the image whitelist (isAllowedTableCellRichImageNode). Attribute view rich text intentionally supports only a restricted subset of block-DOM node types; anything richer is rejected so stored cell content stays renderable and safe.","triggerScenarios":"Parsing rich text that contains disallowed constructs such as code blocks, tables, blockquotes, super blocks, embeds, or (when images=false) image/asset nodes; ParseTableCellRich called with images disabled while the content includes images.","commonSituations":"Pasting multi-block or image-heavy markdown into a database text cell; copying document content into rich text values; enabling images only for table cells but parsing the same content with parseValueTextRich (images=false).","solutions":["Inspect the error's node type name and remove that construct from the cell content (convert to plain styled text)","If the content legitimately contains images, use the images-enabled path (ParseTableCellRich table cell rendering, normalizeValueTextRichTreeSourceWithImages with images=true) rather than parseValueTextRich","Reduce pasted document content to supported inline marks (text marks, refs, inline code/math, etc.) before storing it in a rich text value","Update SiYuan to a version whose node whitelist matches your data if the data was written by a newer kernel"],"exampleFix":"// before\nrich content: \"# Heading\\n\\nparagraph with [doc](siyuan://blocks/20200101120000-abcdefg)\"\n// after\nrich content: \"paragraph text with supported inline marks only, no headings or multi-block content\"","handlingStrategy":"validation","validationCode":"// pre-scan content for multi-block constructs before storing\ntree, err := luteMd2BlockDOMTree(content)\n// reject if it contains headings, tables, code blocks, or (for text values) images","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Paste only inline content into database text cells","Use ParseTableCellRich (images path) for content that may contain images","Strip block-level constructs from pasted document text before storing","Keep kernel versions aligned with any data written by newer builds"],"tags":["attribute-view","rich-text","ast-validation","whitelist"],"backgroundTag":"schema-validation-failed","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"}