{"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":"validation","errorClass":null,"httpStatus":null,"severity":"error","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/251596fc0de2f9528c00c224252fd073a99973f4/kernel/model/export.go#L373-L409","documentation":"Returned by Export2Liandi when the target document belongs to one of SiYuan's built-in user guide notebooks (IsUserGuide(tree.Box) is true). The community-sharing feature (posting to liuyun.io / ld246.com) is intentionally disabled for guide docs to prevent cluttering the community with template content (issue #8388). The message comes from Conf.Language(204).","triggerScenarios":"Export2Liandi is called with a doc ID from the user guide notebook. The user selected a guide doc and clicked 'share to community'. A plugin or automation script attempted to publish a guide page.","commonSituations":"New user exploring the app tried to share a sample/guide document. Browser extension or API script targeted a guide doc by its well-known ID. User duplicated a guide doc into their own notebook but the box flag still marks it as a guide.","solutions":["Select a document from your own notebook (not the user guide notebook) and retry the share.","If you need to share guide-like content, copy it into a personal notebook first so IsUserGuide returns false.","For automation, filter out guide notebooks before calling Export2Liandi."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Filter out user guide docs before calling Export2Liandi\ntree, _ := model.LoadTreeByBlockID(id)\nif tree != nil && model.IsUserGuide(tree.Box) {\n    return errors.New(\"cannot share user guide documents\")\n}","typeGuard":"func isShareableDoc(id string) bool {\n    tree, _ := model.LoadTreeByBlockID(id)\n    return tree != nil && !model.IsUserGuide(tree.Box)\n}","tryCatchPattern":null,"preventionTips":["Only enable the 'share to community' action on documents from user notebooks.","For automation, filter out guide notebook IDs before calling Export2Liandi.","Copy guide content to a personal notebook if sharing is needed."],"tags":["export","liandi","user-guide","community","restriction"],"backgroundTag":null,"analyzedSha":"251596fc0de2f9528c00c224252fd073a99973f4","analyzedAt":"2026-08-12T21:18:37.123Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}