From 6762bd612c4ca2e0ebf0e4a25fb59228421d0c2b Mon Sep 17 00:00:00 2001 From: NiclasNorin Date: Thu, 15 Feb 2024 13:25:25 +0100 Subject: [PATCH] fix: undefined module id --- source/php/Module/Event/Event.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/php/Module/Event/Event.php b/source/php/Module/Event/Event.php index 311eeb5e..f5bc5a84 100644 --- a/source/php/Module/Event/Event.php +++ b/source/php/Module/Event/Event.php @@ -68,8 +68,9 @@ public function data(): array // Cards module data $data['settings'] = $data; + $data['ID'] = $this->ID ?? uniqid(); - $this->template = !empty($data['mod_event_display']) ? $data['mod_event_display'] : 'list'; + $this->template = !empty($data['mod_event_display']) ? $data['mod_event_display'] : 'list'; $data['template'] = $this->template; $data['post_id'] = $post->ID;