{"record":{"id":"c206b8d0efcf8966","repo":"siyuan-note/siyuan","slug":"conf-language-29-localized-subscription-required","errorCode":null,"errorMessage":"Conf.Language(29) (localized subscription-required message)","messagePattern":"Conf\\.Language\\(29\\) \\(localized subscription-required message\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kernel/model/blockial.go","lineNumber":45,"sourceCode":"\t\"github.com/88250/lute/ast\"\n\t\"github.com/88250/lute/editor\"\n\t\"github.com/88250/lute/html\"\n\t\"github.com/88250/lute/parse\"\n\t\"github.com/araddon/dateparse\"\n\t\"github.com/siyuan-note/siyuan/kernel/av\"\n\t\"github.com/siyuan-note/siyuan/kernel/cache\"\n\t\"github.com/siyuan-note/siyuan/kernel/filesys\"\n\t\"github.com/siyuan-note/siyuan/kernel/sql\"\n\t\"github.com/siyuan-note/siyuan/kernel/treenode\"\n\t\"github.com/siyuan-note/siyuan/kernel/util\"\n)\n\nfunc SetCloudReminder(id, content, timed string) (err error) {\n\tif !IsSubscriber() {\n\t\tif \"ios\" == util.Container {\n\t\t\treturn errors.New(Conf.Language(122))\n\t\t}\n\t\treturn errors.New(Conf.Language(29))\n\t}\n\n\tvar timedMills int64\n\tif \"0\" != timed {\n\t\tt, e := dateparse.ParseIn(timed, time.Now().Location())\n\t\tif nil != e {\n\t\t\treturn e\n\t\t}\n\t\ttimedMills = t.UnixMilli()\n\t}\n\n\tcontent = strings.TrimSpace(content)\n\terr = SetCloudBlockReminder(id, content, timedMills)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tif \"0\" == timed {","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/8641553a1f07374001902d3ce773285db1292b2d/kernel/model/blockial.go#L27-L63","documentation":"SetCloudReminder requires an active SiYuan subscription. When the user is not a subscriber and the container is not iOS, it returns the generic localized subscription-required message from Conf.Language(29). Same entitlement guard as the iOS variant, applied to desktop, mobile (non-iOS), and other containers.","triggerScenarios":"Calling SetCloudReminder (API /api/block/setCloudReminder) without an active subscription on desktop or non-iOS mobile — e.g. a plugin or script setting a cloud reminder while logged out or with an expired subscription.","commonSituations":"Self-hosted/desktop users without membership invoking the cloud reminder API via automation; subscription lapsing between calls; scripts assuming reminder sync is free.","solutions":["Purchase or renew the SiYuan subscription and ensure the account is logged in","Use local reminder mechanisms or skip cloud reminder sync for non-subscriber accounts","Check IsSubscriber-equivalent state client-side before calling setCloudReminder and show the upgrade prompt (Language 29)"],"exampleFix":"// before\nawait fetchPost('/api/block/setCloudReminder', {id, content, timed});\n// after\nconst sub = await fetchPost('/api/account/...', {}); // check subscription state first\nif (!sub.data.isSubscriber) {\n  showMessage(window.siyuan.languages[29]); // prompt upgrade instead of erroring\n  return;\n}\nawait fetchPost('/api/block/setCloudReminder', {id, content, timed});","handlingStrategy":"try-catch","validationCode":"if (!window.siyuan.user || subscriptionExpired(window.siyuan.user)) {\n  showMessage(window.siyuan.languages[29]);\n  return;\n}","typeGuard":null,"tryCatchPattern":"try {\n  await fetchPost('/api/block/setCloudReminder', {id, content, timed});\n} catch (e) {\n  if (String(e.msg || e) === window.siyuan.languages[29]) {\n    openMembershipDialog(); // prompt upgrade once, no retry\n    return;\n  }\n  throw e;\n}","preventionTips":["Gate cloud reminder calls on the logged-in user's subscription state","Treat this error as a permanent condition until the subscription is renewed","Provide local reminder alternatives in plugins aimed at non-subscriber users"],"tags":["subscription","cloud-reminder","entitlement","kernel"],"backgroundTag":"authentication-required","analyzedSha":"8641553a1f07374001902d3ce773285db1292b2d","analyzedAt":"2026-09-11T16:08:28.414Z","contentChangedAt":"2026-09-11T16:08:28.414Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}