{"record":{"id":"adb8613651ff58c7","repo":"siyuan-note/siyuan","slug":"require-upgrade-siyuan-to-use-this-plugin-s","errorCode":null,"errorMessage":"require upgrade SiYuan to use this plugin [%s]","messagePattern":"require upgrade SiYuan to use this plugin \\[(.+?)\\]","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/plugin.go","lineNumber":85,"sourceCode":"\tif !found {\n\t\terr = fmt.Errorf(\"plugin [%s] not found\", name)\n\t\tlogging.LogErrorf(\"%s\", err)\n\t\treturn\n\t}\n\n\tret, err = updatePetal(name, func(petal *Petal) error {\n\t\tpetal.Version = version\n\t\tpetal.DisplayName = displayName\n\t\tpetal.Enabled = enabled\n\t\tpetal.Incompatible = incompatible\n\t\tpetal.DisabledInPublish = disabledInPublish\n\t\tpetal.DisallowInstall = disallowInstall\n\t\tpetal.Kernel = KernelPetal{\n\t\t\tIncompatible: kernelIncompatible,\n\t\t}\n\n\t\tif enabled && disallowInstall {\n\t\t\treturn fmt.Errorf(\"require upgrade SiYuan to use this plugin [%s]\", name)\n\t\t}\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\tlogging.LogInfof(\"%s\", err)\n\t\treturn\n\t}\n\n\tloadCode(ret)\n\n\t// Hook kernel plugin lifecycle (callbacks avoid circular import with plugin package)\n\tif enabled {\n\t\tif OnKernelPluginStart != nil {\n\t\t\tOnKernelPluginStart(ret)\n\t\t}\n\t} else {\n\t\tif OnKernelPluginStop != nil {\n\t\t\tOnKernelPluginStop(ret)","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/model/plugin.go#L67-L103","documentation":"Inside SetPetalEnabled's updatePetal callback, if the caller asks to enable a plugin (enabled == true) whose metadata marks it as disallowInstall (the plugin requires a newer SiYuan kernel/frontend than the running version), the enable is rejected with this error. It prevents activating plugins whose declared minimum SiYuan version exceeds the running version.","triggerScenarios":"SetPetalEnabled(name, true) on a plugin whose plugin.json / marketplace metadata sets a minimum SiYuan version (front-end or back-end) higher than the running kernel version, so bazaar.ParseInstalledPlugin reports disallowInstall=true. Disabling still works; only enabling is blocked.","commonSituations":"SiYuan not yet upgraded after a plugin update raised its minimum version; plugin installed from a marketplace listing targeting a newer release channel; running an older kernel build against a newer plugin.","solutions":["Upgrade SiYuan to the version required by the plugin, then enable it.","Keep the plugin disabled until the app is updated.","Downgrade the plugin to a version compatible with the running SiYuan release.","If the version requirement is wrong, fix the plugin's minimum-version metadata in its repository."],"exampleFix":"// before\n_, err := model.SetPetalEnabled(\"new-plugin\", true) // fails: requires newer kernel\n// after\nif !util.Ver2Enough(currentVer, pluginMinVer) {\n    return fmt.Errorf(\"upgrade SiYuan to %s to enable this plugin\", pluginMinVer)\n}\n_, err := model.SetPetalEnabled(\"new-plugin\", true)","handlingStrategy":"validation","validationCode":"_, _, _, _, _, disallowInstall, _ := bazaar.ParseInstalledPlugin(name, \"\")\nif enabled && disallowInstall {\n    return fmt.Errorf(\"upgrade SiYuan before enabling plugin %s\", name)\n}","typeGuard":null,"tryCatchPattern":"if _, err := model.SetPetalEnabled(name, true); err != nil {\n    if strings.HasPrefix(err.Error(), \"require upgrade SiYuan\") {\n        // show 'update required' dialog with download link\n    }\n}","preventionTips":["Check the plugin's minimum-version metadata before enabling","Keep SiYuan updated alongside marketplace plugins","Downgrade plugins whose minimum version exceeds the running kernel","Surface the version requirement in the plugin UI instead of failing silently"],"tags":["plugin","version-incompatibility","petal"],"backgroundTag":"version-incompatibility","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"}