octobercms/october · error · SystemException
Vue component [ ] must define a $componentName property.
Error message
Vue component [%s] must define a $componentName property.
What it means
Thrown by VueComponentBase::getComponentName when the class's $componentName property is empty. The framework needs this property to derive the Vue tag name for the component; failing to define it is an incomplete class definition rather than a runtime data problem.
Solutions
- Add a protected $componentName property with a kebab-case tag string to the Vue component class
- Extend the correct base class that defines componentName, or copy the convention from a working VueComponent
- Ensure the property is not accidentally reset to null in the subclass constructor
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/backend/classes/VueComponentBase.php:196 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/32c6892cb44d3083.
Report an issue: GitHub.
Appendix: source
Thrown at modules/backend/classes/VueComponentBase.php:196
{
}
/**
* getComponentBaseName
*/
protected function getComponentBaseName()
{
$classNameArray = explode('\\', get_class($this));
return strtolower(end($classNameArray));
}
/**
* getComponentName returns the Vue component tag name.
*/
public function getComponentName(): string
{
if (!$this->componentName) {
throw new SystemException(sprintf(
'Vue component [%s] must define a $componentName property.',
get_class($this)
));
}
return $this->componentName;
}
/**
* getSubcomponentName returns the Vue component tag name for a subcomponent.
*/
public function getSubcomponentName(string $subcomponent): string
{
return $this->getComponentName() . '-' . $subcomponent;
}
/**
* registerSubcomponent adds a subcomponent.View on GitHub (pinned to b608633a7e)