octobercms/october · error · ApplicationException
Missing configuration for [pivot.form] in…
Error message
Missing configuration for [pivot.form] in RelationController definition [{$this->field}]. What it means
Thrown when the RelationController pivot widget has not been initialized, meaning the relation definition for the field lacks a pivot.form configuration block (the YAML config that defines the pivot model form). It fires when a pivot-mode AJAX action (add/manage pivot) is triggered but $this->pivotWidget is null because no pivot form was configured.
Solutions
- Add a pivot.form section to the relation definition in the controller's config YAML, e.g. pivot: { form: ~/plugins/author/plugin/models/pivot/fields.yaml }
- Provide a pivot model class via the pivot[] relation definition so the pivot form can be built
- If pivot behavior is not intended, stop invoking pivot-mode handlers (onRelationManageAddPivot / pivot buttons) for this field
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/backend/behaviors/relationcontroller/HasPivotMode.php:122 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/2d713f809077bda4.
Report an issue: GitHub.
Appendix: source
Thrown at modules/backend/behaviors/relationcontroller/HasPivotMode.php:122
}
/**
* onRelationManageAddPivot adds multiple items using a single pivot form.
*/
public function onRelationManageAddPivot()
{
return $this->onRelationManagePivotForm();
}
/**
* onRelationManagePivotForm
*/
public function onRelationManagePivotForm()
{
$this->beforeAjax();
if (!$this->pivotWidget) {
throw new ApplicationException("Missing configuration for [pivot.form] in RelationController definition [{$this->field}].");
}
$this->vars['foreignId'] = $this->foreignId ?: post('checked');
return $this->relationMakePartial('pivot_form');
}
/**
* onRelationManagePivotCreate
*/
public function onRelationManagePivotCreate()
{
$this->beforeAjax();
// If the pivot model fails for some reason, abort the sync
Db::transaction(function () {
// Add the checked IDs to the pivot table
$foreignIds = (array) $this->foreignId;View on GitHub (pinned to b608633a7e)