diff --git a/modules/backend/formwidgets/TagList.php b/modules/backend/formwidgets/TagList.php index 1163f18c1..2e2b5c0b7 100644 --- a/modules/backend/formwidgets/TagList.php +++ b/modules/backend/formwidgets/TagList.php @@ -137,7 +137,9 @@ class TagList extends FormWidgetBase $newTags = $this->customTags ? array_diff($names, $existingTags) : []; foreach ($newTags as $newTag) { - $newModel = $relationModel::create([$this->nameFrom => $newTag]); + $newModel = new $relationModel; + $newModel->{$this->nameFrom} = $newTag; + $newModel->save(); $existingTags[$newModel->getKey()] = $newTag; }