octobercms/october · error · SystemException

Subcomponent not registered

Error message

Subcomponent not registered: %s

What it means

Thrown by VueComponentBase::renderSubcomponent when the requested subcomponent name has no entry in the $subcomponents array of the component class. It is a registration guard: the component tried to render a named sub-partial that was never declared in its subcomponents map.

Solutions

  1. Register the subcomponent in the class's $subcomponents property (name => partial/config)
  2. Check the spelling/case of the name passed to renderSubcomponent against the registered keys
  3. If the partial exists standalone, call makePartial directly instead of renderSubcomponent
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/backend/classes/VueComponentBase.php:91 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/d5f2a0daec09d465. Report an issue: GitHub.

Appendix: source

Thrown at modules/backend/classes/VueComponentBase.php:91

        parent::__construct();
    }

    /**
     * render the default component partial.
     */
    public function render()
    {
        return $this->makePartial($this->getComponentBaseName());
    }

    /**
     * renderSubcomponent
     */
    public function renderSubcomponent($name)
    {
        if (!array_key_exists($name, $this->subcomponents)) {
            throw new SystemException(sprintf('Subcomponent not registered: %s', $name));
        }

        return $this->makePartial($name);
    }

    /**
     * getDependencies
     */
    public function getDependencies()
    {
        return $this->require;
    }

    /**
     * getSubcomponents
     */
    public function getSubcomponents()
    {

View on GitHub (pinned to b608633a7e)