From ba03f6b61ac98b81c174cef9ca9f37ec9e1b4ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6rner?= Date: Thu, 13 Aug 2026 10:55:09 +0200 Subject: [PATCH 1/3] fix exception due invalid contao record retrival --- .idea/contao-bootstrap-grid.iml | 8 +++ .idea/inspectionProfiles/Project_Default.xml | 6 ++ .idea/misc.xml | 74 ++++++++++++++++++++ .idea/modules.xml | 8 +++ .idea/workspace.xml | 27 +++++++ src/Listener/Dca/ContentListener.php | 6 +- 6 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 .idea/contao-bootstrap-grid.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/contao-bootstrap-grid.iml b/.idea/contao-bootstrap-grid.iml new file mode 100644 index 0000000..c956989 --- /dev/null +++ b/.idea/contao-bootstrap-grid.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..50d1ecd --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..26f081c --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,74 @@ + + + + + + + + Angular + + + AnnotationPHP + + + AssetSymfony + + + CSS + + + Code stylePHP + + + ComposerPHP + + + Control flow issuesJavaScript and TypeScript + + + Docker-compose + + + GeneralJavaScript and TypeScript + + + GeneralPHP + + + HTTP Client + + + Invalid elementsCSS + + + JavaScript and TypeScript + + + Laravel Idea + + + OpenAPI specifications + + + PHP + + + PSR-12Code stylePHP + + + Symfony + + + TwigSymfony + + + TypeScriptJavaScript and TypeScript + + + Vue + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..27c3e33 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..f658be4 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,27 @@ + + + + + + + + + + { + "keyToString": { + "last_opened_file_path": "/home/dev/.ssh/id_ed25519", + "settings.editor.selected.configurable": "Errors" + } +} + + + 1780987014676 + + + + \ No newline at end of file diff --git a/src/Listener/Dca/ContentListener.php b/src/Listener/Dca/ContentListener.php index fc6cc74..cb7425b 100644 --- a/src/Listener/Dca/ContentListener.php +++ b/src/Listener/Dca/ContentListener.php @@ -74,7 +74,11 @@ public function initializeDca(): void public function updatePaletteOnNestedParent(DataContainer $dataContainer): void { $input = $this->framework->getAdapter(Input::class); - $currentRecord = $dataContainer->getCurrentRecord(); + try { + $currentRecord = $dataContainer->getCurrentRecord(); + } catch (\Exception $e) { + return; + } if ($input->get('act') !== 'edit' || $currentRecord === null) { return; From f601ec39825c33bb91178fd86a64bd3d3707e863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6rner?= Date: Thu, 13 Aug 2026 11:08:17 +0200 Subject: [PATCH 2/3] adjust code, remove idea folder --- src/Listener/Dca/ContentListener.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Listener/Dca/ContentListener.php b/src/Listener/Dca/ContentListener.php index cb7425b..3e91bf1 100644 --- a/src/Listener/Dca/ContentListener.php +++ b/src/Listener/Dca/ContentListener.php @@ -74,13 +74,14 @@ public function initializeDca(): void public function updatePaletteOnNestedParent(DataContainer $dataContainer): void { $input = $this->framework->getAdapter(Input::class); - try { - $currentRecord = $dataContainer->getCurrentRecord(); - } catch (\Exception $e) { + + if ($input->get('act') !== 'edit') { return; } - if ($input->get('act') !== 'edit' || $currentRecord === null) { + $currentRecord = $dataContainer->getCurrentRecord(); + + if ($currentRecord === null) { return; } From 15b1acbed5d2dfa61e03ec62352f9f8645d20bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6rner?= Date: Thu, 13 Aug 2026 11:08:51 +0200 Subject: [PATCH 3/3] remove idea folder --- .idea/contao-bootstrap-grid.iml | 8 --- .idea/inspectionProfiles/Project_Default.xml | 6 -- .idea/misc.xml | 74 -------------------- .idea/modules.xml | 8 --- .idea/workspace.xml | 27 ------- 5 files changed, 123 deletions(-) delete mode 100644 .idea/contao-bootstrap-grid.iml delete mode 100644 .idea/inspectionProfiles/Project_Default.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/workspace.xml diff --git a/.idea/contao-bootstrap-grid.iml b/.idea/contao-bootstrap-grid.iml deleted file mode 100644 index c956989..0000000 --- a/.idea/contao-bootstrap-grid.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 50d1ecd..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 26f081c..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - Angular - - - AnnotationPHP - - - AssetSymfony - - - CSS - - - Code stylePHP - - - ComposerPHP - - - Control flow issuesJavaScript and TypeScript - - - Docker-compose - - - GeneralJavaScript and TypeScript - - - GeneralPHP - - - HTTP Client - - - Invalid elementsCSS - - - JavaScript and TypeScript - - - Laravel Idea - - - OpenAPI specifications - - - PHP - - - PSR-12Code stylePHP - - - Symfony - - - TwigSymfony - - - TypeScriptJavaScript and TypeScript - - - Vue - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 27c3e33..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index f658be4..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - { - "keyToString": { - "last_opened_file_path": "/home/dev/.ssh/id_ed25519", - "settings.editor.selected.configurable": "Errors" - } -} - - - 1780987014676 - - - - \ No newline at end of file