{"record":{"id":"3bf3d1532865e183","repo":"siyuan-note/siyuan","slug":"the-doc-in-the-user-guide-does-not-support-sharing","errorCode":null,"errorMessage":"The doc in the user guide does not support sharing to the community","messagePattern":"The doc in the user guide does not support sharing to the community","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kernel/model/export.go","lineNumber":391,"sourceCode":"\t\t} else {\n\t\t\tzipPath = \"/export/csv/\" + url.PathEscape(filepath.Base(absZipPath))\n\t\t}\n\t\treturn nil\n\t})\n\treturn\n}\n\nfunc Export2Liandi(id string) (err error) {\n\terr = withExportReadLockByBlockID(id, func() error {\n\t\ttree, loadErr := LoadTreeByBlockID(id)\n\t\tif loadErr != nil {\n\t\t\tlogging.LogErrorf(\"load tree by block id [%s] failed: %s\", id, loadErr)\n\t\t\treturn loadErr\n\t\t}\n\n\t\tif IsUserGuide(tree.Box) {\n\t\t\t// Doc in the user guide no longer supports one-click sending to the community https://github.com/siyuan-note/siyuan/issues/8388\n\t\t\treturn errors.New(Conf.Language(204))\n\t\t}\n\n\t\tassets := getAssetsLinkDests(tree.Root, false)\n\t\tembedAssets := getQueryEmbedNodesAssetsLinkDests(tree.Root)\n\t\tassets = append(assets, embedAssets...)\n\t\tassets = gulu.Str.RemoveDuplicatedElem(assets)\n\t\t_, err = uploadAssets2Cloud(assets, bizTypeExport2Liandi, false)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tmsgId := util.PushMsg(Conf.Language(182), 15000)\n\t\tdefer util.PushClearMsg(msgId)\n\n\t\t// 判断帖子是否已经存在，存在则使用更新接口\n\t\tconst liandiArticleIdAttrName = \"custom-liandi-articleid\"\n\t\tconst liandiArticleIdAttrNameOld = \"custom-liandi-articleId\" // 兼容旧属性名\n\t\tfoundArticle := false","sourceCodeStart":373,"sourceCodeEnd":409,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/afa823b6b4e4f183511e0bc0a3be93caa94c7c97/kernel/model/export.go#L373-L409","documentation":"Export2Liandi refuses to share documents that live in the built-in user-guide notebook, returning localized message 204 ('The doc in the user guide does not support sharing to the community'). Sharing guide content to the community endpoint was intentionally disabled (issue #8388).","triggerScenarios":"Invoking export/share-to-liandi on any doc whose box passes IsUserGuide(tree.Box), i.e. the SiYuan user guide notebook.","commonSituations":"User browses the built-in user guide and tries the share-to-community action; scripts that iterate all notebooks hit the guide notebook.","solutions":["Copy the content into a personal notebook and share it from there","Client-side: filter out the user-guide notebook before offering the share action","Scripts: skip boxes for which IsUserGuide returns true"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if model.IsUserGuide(boxID) {\n    // hide or disable the share-to-community action for guide docs\n}","typeGuard":null,"tryCatchPattern":"if err := model.Export2Liandi(id); err != nil {\n    if err.Error() == model.Conf.Language(204) {\n        // guide doc: inform user to copy content to a personal notebook\n    }\n}","preventionTips":["Filter the user-guide notebook out of bulk share operations","Copy guide content into personal notebooks before sharing","Localize the handling on message 204 rather than raw error text"],"tags":["export","liandi","user-guide","policy"],"backgroundTag":"operation-not-permitted","analyzedSha":"afa823b6b4e4f183511e0bc0a3be93caa94c7c97","analyzedAt":"2026-08-18T17:04:10.865Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}