-
-
Notifications
You must be signed in to change notification settings - Fork 234
Labels
low priorityIssues that are backlogged for when things are less busyIssues that are backlogged for when things are less busy
Description
Winter CMS Build
dev-develop
PHP Version
7.4
Database engine
No database
Plugins installed
No response
Issue description
When using the Relation formwidget with an unsupported relationship (example detailed below), the formwidget is throwing this misleading Exception:

Steps to replicate
Create a polymorphic One To Many relationship:
class Comment extends Model
{
public $morphTo = [
'commentable' => []
];
}
class Post extends Model
{
public $morphMany = [
'comments' => ['Acme\Blog\Models\Comment', 'name' => 'commentable']
];
}
class Product extends Model
{
public $morphMany = [
'comments' => ['Acme\Blog\Models\Comment', 'name' => 'commentable']
];
}and then use the commentable relationship inside a relation formwidget of the Comment form.
Workaround
No response
Any further details?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
low priorityIssues that are backlogged for when things are less busyIssues that are backlogged for when things are less busy