diff --git a/app/Http/Controllers/Admin/EditContent.php b/app/Http/Controllers/Admin/EditContent.php index 2acab439..dd6c3e49 100644 --- a/app/Http/Controllers/Admin/EditContent.php +++ b/app/Http/Controllers/Admin/EditContent.php @@ -41,11 +41,11 @@ class EditContent extends Controller $statuses = ContentStatuses::getWithTranslations(); // try to find requested page - $page = Content::where('module_handler', config('staticpages.handler')) - ->findOrFail($id); + $page = Content::findOrFail($id); + $page->module_settings = json_decode($page->module_settings); $allModules = ModulesHandlerToId::getWithTranslations(); - $moduleId = $allModules[config('staticpages.handler')]; + $moduleId = $allModules[$page->module_handler]; $templates = Template::where('module_id', $moduleId) ->select(['template_name', 'name', 'description']) ->get();