{"record":{"id":"32c6892cb44d3083","repo":"octobercms/october","slug":"vue-component-s-must-define-a-componentname-pr","errorCode":null,"errorMessage":"Vue component [%s] must define a $componentName property.","messagePattern":"Vue component \\[(.+?)\\] must define a \\$componentName property\\.","errorType":"exception","errorClass":"SystemException","httpStatus":null,"severity":"error","filePath":"modules/backend/classes/VueComponentBase.php","lineNumber":196,"sourceCode":"    {\n    }\n\n    /**\n     * getComponentBaseName\n     */\n    protected function getComponentBaseName()\n    {\n        $classNameArray = explode('\\\\', get_class($this));\n        return strtolower(end($classNameArray));\n    }\n\n    /**\n     * getComponentName returns the Vue component tag name.\n     */\n    public function getComponentName(): string\n    {\n        if (!$this->componentName) {\n            throw new SystemException(sprintf(\n                'Vue component [%s] must define a $componentName property.',\n                get_class($this)\n            ));\n        }\n\n        return $this->componentName;\n    }\n\n    /**\n     * getSubcomponentName returns the Vue component tag name for a subcomponent.\n     */\n    public function getSubcomponentName(string $subcomponent): string\n    {\n        return $this->getComponentName() . '-' . $subcomponent;\n    }\n\n    /**\n     * registerSubcomponent adds a subcomponent.","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/classes/VueComponentBase.php#L178-L214","documentation":"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.","triggerScenarios":"Thrown at modules/backend/classes/VueComponentBase.php:196 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","contentChangedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}