{"record":{"id":"7addd59f6cfd5d75","repo":"octobercms/october","slug":"component-not-found","errorCode":null,"errorMessage":"Component not found","messagePattern":"Component not found","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"modules/cms/classes/editorextension/HasComponentListLoader.php","lineNumber":103,"sourceCode":"\n    /**\n     * makePropertiesForUnknownComponent\n     */\n    private function makePropertiesForUnknownComponent($properties, $alias)\n    {\n        $properties['oc.alias'] = $alias;\n\n        return $properties;\n    }\n\n    /**\n     * makeTemplateComponent\n     */\n    private function makeTemplateComponent($manager, $name, $properties, $alias)\n    {\n        $componentObj = $manager->makeComponent($name, null, $properties);\n        if (!$componentObj) {\n            throw new Exception('Component not found');\n        }\n\n        $componentObj->alias = $alias;\n\n        $propertyConfig = ComponentHelpers::getComponentsPropertyConfig($componentObj, true, true);\n        $propertyConfig = json_encode($propertyConfig, JSON_UNESCAPED_SLASHES);\n\n        $propertyValues = ComponentHelpers::getComponentPropertyValues($componentObj, true);\n        $propertyValues = json_encode($propertyValues, JSON_UNESCAPED_SLASHES);\n\n        return [\n            'alias' => $alias,\n            'name' => $componentObj->name,\n            'title' => ComponentHelpers::getComponentName($componentObj),\n            'icon' => $this->getComponentPluginIcon($manager, $componentObj),\n            'className' => get_class($componentObj),\n            'description' => ComponentHelpers::getComponentDescription($componentObj),\n            'inspectorEnabled' => $componentObj->inspectorEnabled,","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/cms/classes/editorextension/HasComponentListLoader.php#L85-L121","documentation":"While building component metadata for the CMS Editor (EditorExtension), makeTemplateComponent() asks ComponentManager to instantiate a component by name; if makeComponent returns null (unregistered component, disabled or missing plugin) it throws a plain 'Component not found' Exception. Unlike front-end rendering there is no strict-mode opt-out here.","triggerScenarios":"The editor loads a saved template whose settings still reference a component from a disabled/uninstalled plugin, or the component list loader is asked to expand an unknown component name while building the template listing.","commonSituations":"Disabling a plugin but leaving its components in saved pages/partials; renaming a component class without updating stored references; cached editor payloads from an older Winter version.","solutions":["Re-enable or reinstall the plugin that registers the component","Remove the stale component reference from the saved template (edit the file or database record directly)","Clear CMS/config caches so the editor rebuilds its component list","If you renamed the component, keep the old name registered as an alias in registerComponents()"],"exampleFix":"// before: component class no longer registered\npublic function registerComponents(): array { return []; }\n\n// after\npublic function registerComponents(): array\n{\n    return [\\My\\Plugin\\Components\\Alert::class => 'alert'];\n}","handlingStrategy":"validation","validationCode":"use \\Cms\\Classes\\ComponentManager;\n$manager = ComponentManager::instance();\nforeach ($templateComponentNames as $name) {\n    if (!$manager->hasComponent($name)) {\n        unset($components[$name]); // drop unresolvable entries before editor payloads are built\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Before disabling or uninstalling a plugin, remove its components from saved templates","Keep an alias registration for renamed components during a deprecation window","Test the CMS editor after plugin changes, not just the front end"],"tags":["editor","backend","component","plugin","cms"],"backgroundTag":"component-not-registered","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}