octobercms/october · error · ApplicationException

backend::lang.relation.missing_definition

Error message

backend::lang.relation.missing_definition

What it means

Error "backend::lang.relation.missing_definition" thrown in octobercms/october.

Source

Thrown at modules/backend/behaviors/RelationController.php:246

        $this->addJs('js/october.relation.js');
        $this->addCss('css/relation.css');
    }

    /**
     * validateField validates the supplied field and initializes the relation manager.
     * @param string $field The relationship field.
     * @return string The active field name.
     */
    protected function validateField($field = null)
    {
        $field = $field ?: post(self::PARAM_FIELD);

        if ($field && $field !== $this->field) {
            $this->initRelation($this->model, $field);
        }

        if (!$field && !$this->field) {
            throw new ApplicationException(Lang::get('backend::lang.relation.missing_definition', compact('field')));
        }

        return $field ?: $this->field;
    }

    /**
     * prepareVars for display
     */
    public function prepareVars()
    {
        $this->vars['relationLabel'] = $this->config->label ?: $this->field;
        $this->vars['relationField'] = $this->field;
        $this->vars['relationPopupSize'] = $this->popupSize;
        $this->vars['relationReadOnly'] = $this->readOnly;
        $this->vars['relationType'] = $this->relationType;
        $this->vars['relationSearchWidget'] = $this->searchWidget;
        $this->vars['relationToolbarWidget'] = $this->toolbarWidget;
        $this->vars['relationToolbarButtons'] = $this->toolbarButtons;

View on GitHub (pinned to b608633a7e)

When it happens

Trigger: Thrown at modules/backend/behaviors/RelationController.php:246 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/6cb1d48272599741. Report an issue: GitHub.