{"record":{"id":"e447839dac84cd4d","repo":"getgrav/grav","slug":"plugin-this-pluginname-is-not-enabled","errorCode":null,"errorMessage":"Plugin \"{$this->pluginName}\" is not enabled.","messagePattern":"Plugin \"(.+?)\" is not enabled\\.","errorType":"console","errorClass":"NamespaceNotFoundException","httpStatus":null,"severity":"error","filePath":"system/src/Grav/Console/Application/PluginApplication.php","lineNumber":111,"sourceCode":"\n        if (null === $this->pluginName) {\n            $this->setDefaultCommand('plugins:list');\n\n            return;\n        }\n\n        $grav = Grav::instance();\n        $grav->initializeCli();\n\n        /** @var Plugins $plugins */\n        $plugins = $grav['plugins'];\n\n        $plugin = $this->pluginName ? $plugins::get($this->pluginName) : null;\n        if (null === $plugin) {\n            throw new NamespaceNotFoundException(\"Plugin \\\"{$this->pluginName}\\\" is not installed.\");\n        }\n        if (!$plugin->enabled) {\n            throw new NamespaceNotFoundException(\"Plugin \\\"{$this->pluginName}\\\" is not enabled.\");\n        }\n\n        $this->setCommandLoader(new PluginCommandLoader($this->pluginName));\n    }\n}\n","sourceCodeStart":93,"sourceCodeEnd":117,"githubUrl":"https://github.com/getgrav/grav/blob/6040efed04efa69b8209448ed81308e7c24147c2/system/src/Grav/Console/Application/PluginApplication.php#L93-L117","documentation":"Grav's PluginApplication throws this when the named plugin IS registered but its enabled property is false, so its CLI commands are deliberately not exposed. It is a configuration gate, not a code failure: Grav refuses to attach the PluginCommandLoader for a disabled plugin.","triggerScenarios":"Running `bin/plugin <slug> <command>` while user/config/plugins/<slug>.yaml (or the plugin's own user/plugins/<slug>/<slug>.yaml) sets enabled: false; the plugin was disabled from the admin interface; a site-wide plugins config override disables it; or the plugin ships disabled by default and was never turned on.","commonSituations":"Plugin toggled off in admin during troubleshooting and forgotten; staging config copied to production with enabled: false; plugin disabled by default (many premium/plugin-first plugins are) after a fresh install; YAML indentation error making the enabled flag land under the wrong key.","solutions":["Enable the plugin: in Admin under Plugins, toggle it on, or edit user/config/plugins/<slug>.yaml and set `enabled: true` (create the file if absent).","Check for competing overrides: the effective value comes from user/config/system.yaml, user/config/plugins/<slug>.yaml and the plugin's own YAML — make sure none sets enabled: false later in the merge order.","Verify: `bin/gpm info <slug>` or reload admin Plugins page to confirm the state, then re-run the CLI command.","If it must stay disabled in web context but run in CLI, note Grav does not support that split via this flag — you need the plugin enabled for its CLI commands."],"exampleFix":"# user/config/plugins/email.yaml\n# before\nenabled: false\n\n# after\nenabled: true\n\n# then: bin/plugin email flush-queue works","handlingStrategy":"validation","validationCode":"use Grav\\Common\\Grav;\nuse Grav\\Common\\Plugins;\n\n$grav = Grav::instance();\n$grav['plugins']->init();\n\n$plugin = Plugins::get($slug);\nif (null === $plugin) {\n    exit(\"Plugin {$slug} not installed\" . PHP_EOL);\n}\nif (!$plugin->enabled) {\n    exit(\"Plugin {$slug} is disabled; set enabled: true in user/config/plugins/{$slug}.yaml\" . PHP_EOL);\n}","typeGuard":null,"tryCatchPattern":"try {\n    $app->run();\n} catch (\\Symfony\\Component\\Console\\Exception\\NamespaceNotFoundException $e) {\n    // distinguish 'not installed' vs 'not enabled' from the message\n    if (str_contains($e->getMessage(), 'not enabled')) {\n        fwrite(STDERR, \"Enable it: edit user/config/plugins/{$slug}.yaml\" . PHP_EOL);\n    }\n    exit(1);\n}","preventionTips":["Check Plugins::get($slug)->enabled before shelling out to bin/plugin.","Automate plugin enablement in deployment config so staging/production states cannot drift.","After disabling a plugin in admin, remember its CLI commands become unavailable too."],"tags":["grav","cli","plugin","configuration","plugin-disabled"],"backgroundTag":"plugin-disabled","analyzedSha":"6040efed04efa69b8209448ed81308e7c24147c2","analyzedAt":"2026-08-17T05:07:31.593Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}