From c23d671f9104f2239fc77c9601d48eb5c6db5c3a Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Mon, 30 Sep 2019 20:17:02 +1000 Subject: [PATCH] New templates must have a unique widget alias --- modules/cms/controllers/Index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms/controllers/Index.php b/modules/cms/controllers/Index.php index b0ad1636a..c0ecc5ae7 100644 --- a/modules/cms/controllers/Index.php +++ b/modules/cms/controllers/Index.php @@ -661,7 +661,7 @@ class Index extends Controller $widgetConfig = $this->makeConfig($formConfigs[$type]); $widgetConfig->model = $template; - $widgetConfig->alias = $alias ?: 'form'.studly_case($type).md5($template->getFileName()); + $widgetConfig->alias = $alias ?: 'form'.studly_case($type).md5($template->exists ? $template->getFileName() : uniqid()); return $this->makeWidget('Backend\Widgets\Form', $widgetConfig); }