octobercms/october · error · Exception
Component not found
Error message
Component not found
What it means
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.
Source
Thrown at modules/cms/classes/editorextension/HasComponentListLoader.php:103
/**
* makePropertiesForUnknownComponent
*/
private function makePropertiesForUnknownComponent($properties, $alias)
{
$properties['oc.alias'] = $alias;
return $properties;
}
/**
* makeTemplateComponent
*/
private function makeTemplateComponent($manager, $name, $properties, $alias)
{
$componentObj = $manager->makeComponent($name, null, $properties);
if (!$componentObj) {
throw new Exception('Component not found');
}
$componentObj->alias = $alias;
$propertyConfig = ComponentHelpers::getComponentsPropertyConfig($componentObj, true, true);
$propertyConfig = json_encode($propertyConfig, JSON_UNESCAPED_SLASHES);
$propertyValues = ComponentHelpers::getComponentPropertyValues($componentObj, true);
$propertyValues = json_encode($propertyValues, JSON_UNESCAPED_SLASHES);
return [
'alias' => $alias,
'name' => $componentObj->name,
'title' => ComponentHelpers::getComponentName($componentObj),
'icon' => $this->getComponentPluginIcon($manager, $componentObj),
'className' => get_class($componentObj),
'description' => ComponentHelpers::getComponentDescription($componentObj),
'inspectorEnabled' => $componentObj->inspectorEnabled,View on GitHub (pinned to b608633a7e)
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()
Example fix
// before: component class no longer registered
public function registerComponents(): array { return []; }
// after
public function registerComponents(): array
{
return [\My\Plugin\Components\Alert::class => 'alert'];
} Defensive patterns
Strategy: validation
Validate before calling
use \Cms\Classes\ComponentManager;
$manager = ComponentManager::instance();
foreach ($templateComponentNames as $name) {
if (!$manager->hasComponent($name)) {
unset($components[$name]); // drop unresolvable entries before editor payloads are built
}
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- cms::lang.component.no_records
- cms::lang.component.not_found
- Component does use a default partial
- cms::lang.component.not_found
- Document data is not provided
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/7addd59f6cfd5d75.
Report an issue: GitHub.