octobercms/october · error · ApplicationException
The relationship morphTo is not supported for list columns.
Error message
The relationship morphTo is not supported for list columns.
What it means
Error "The relationship morphTo is not supported for list columns." thrown in octobercms/october.
Source
Thrown at modules/backend/widgets/Lists.php:516
}
// Allow extensions inside the search grouping
$this->fireSystemEvent('backend.list.extendSearchQuery', [$innerQuery]);
});
// Custom select queries
foreach ($this->getVisibleColumns() as $column) {
if (!$column->sqlSelect) {
continue;
}
$alias = $query->getQuery()->getGrammar()->wrap($column->columnName);
// Relation column
if ($column->relation) {
$relationType = $this->model->getRelationType($column->relation);
if ($relationType === 'morphTo') {
throw new ApplicationException('The relationship morphTo is not supported for list columns.');
}
$table = $this->model->makeRelation($column->relation)->getTable();
$sqlSelect = $this->parseTableName($column->sqlSelect, $table);
// Manipulate a count query for the sub query
$relationObj = $this->model->{$column->relation}();
$relationQuery = $relationObj->getRelated()->newQuery();
// Apply related constraints to the sub query
// Possibility: the column could contribute to this via conditions or scope
$relationObj->addDefinedConstraintsToQuery($relationQuery);
$countQuery = $relationObj->getRelationExistenceQuery($relationQuery, $query);
$isMultiRelation = $this->isColumnRelated($column, true);
$joinSql = $isMultiRelationView on GitHub (pinned to b608633a7e)
When it happens
Trigger: Thrown at modules/backend/widgets/Lists.php:516 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/2bcaf9af2dc96aa8.
Report an issue: GitHub.