From 74177c7e2a90efca186b8d796dbdb5be385a81af Mon Sep 17 00:00:00 2001 From: Awilum Date: Thu, 27 Feb 2020 17:33:01 +0300 Subject: [PATCH] fix(admin-panel): fix issues with routable field on entry edit --- site/plugins/admin/app/Controllers/EntriesController.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/site/plugins/admin/app/Controllers/EntriesController.php b/site/plugins/admin/app/Controllers/EntriesController.php index dcaf98d2..07c1174e 100644 --- a/site/plugins/admin/app/Controllers/EntriesController.php +++ b/site/plugins/admin/app/Controllers/EntriesController.php @@ -871,6 +871,14 @@ class EntriesController extends Controller Arr::delete($entry, 'modified_at'); Arr::delete($entry, 'created_at'); + if (isset($data['routable'])) { + $data['routable'] = (bool) $data['routable']; + } elseif(isset($entry['routable'])) { + $data['routable'] = (bool) $entry['routable']; + } else { + $data['routable'] = true; + } + // Merge entry data with $data $result_data = array_merge($entry, $data);