diff --git a/src/Admin/SubsiteAdmin.php b/src/Admin/SubsiteAdmin.php index 6c1c4c8f..4e345c4e 100644 --- a/src/Admin/SubsiteAdmin.php +++ b/src/Admin/SubsiteAdmin.php @@ -40,7 +40,7 @@ public function getEditForm($id = null, $fields = null) $form = parent::getEditForm($id, $fields); if ($this->modelClass === Subsite::class) { - $grid = $form->Fields()->dataFieldByName(str_replace('\\', '-', Subsite::class)); + $grid = $form->Fields()->dataFieldByName($this->sanitiseClassName(Subsite::class)); if ($grid) { $grid->getConfig()->getComponentByType(GridFieldPaginator::class)->setItemsPerPage(100); $grid->getConfig()->removeComponentsByType(GridFieldDetailForm::class);