From c3f8309b33515ccc656587b7019d38471fbe50e9 Mon Sep 17 00:00:00 2001 From: jekuaitk Date: Wed, 8 Apr 2026 13:27:03 +0200 Subject: [PATCH 1/2] Adjust Digital Post error messages --- CHANGELOG.md | 3 ++- .../os2forms_digital_post/src/Helper/WebformHelperSF1601.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ababfd3..8a62b88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -424,7 +424,8 @@ f/OS-115_dawa_address - Security in case of vulnerabilities. ``` -[Unreleased]: https://github.com/OS2Forms/os2forms/compare/4.1.0...HEAD +[Unreleased]: https://github.com/OS2Forms/os2forms/compare/5.0.0...HEAD +[5.0.0]: https://github.com/OS2Forms/os2forms/compare/4.1.0...5.0.0 [4.1.0]: https://github.com/OS2Forms/os2forms/compare/4.0.0...4.1.0 [4.0.0]: https://github.com/OS2Forms/os2forms/compare/3.22.2...4.0.0 [3.22.2]: https://github.com/OS2Forms/os2forms/compare/3.22.1...3.22.2 diff --git a/modules/os2forms_digital_post/src/Helper/WebformHelperSF1601.php b/modules/os2forms_digital_post/src/Helper/WebformHelperSF1601.php index 3d079fe..807af27 100644 --- a/modules/os2forms_digital_post/src/Helper/WebformHelperSF1601.php +++ b/modules/os2forms_digital_post/src/Helper/WebformHelperSF1601.php @@ -90,7 +90,7 @@ public function sendDigitalPost(WebformSubmissionInterface $submission, array $h $handlerMessageSettings = $handlerSettings[WebformHandlerSF1601::MEMO_MESSAGE]; $recipientIdentifierKey = $handlerMessageSettings[WebformHandlerSF1601::RECIPIENT_ELEMENT] ?? NULL; if (NULL === $recipientIdentifierKey) { - $message = 'Recipient identifier element (key: @element_key) not found in submission'; + $message = 'Recipient identifier element (key: @element_key) not found in handler settings'; $context = [ '@element_key' => WebformHandlerSF1601::RECIPIENT_ELEMENT, ]; @@ -115,7 +115,7 @@ public function sendDigitalPost(WebformSubmissionInterface $submission, array $h if (NULL === $recipientIdentifier) { $message = 'Recipient identifier element (key: @element_key) not found in submission'; $context = [ - '@element_key' => WebformHandlerSF1601::RECIPIENT_ELEMENT, + '@element_key' => $recipientIdentifierKey, ]; $this->error($message, $context); From 433a83a2eee5c20b2621df8c639add6fab2e4184 Mon Sep 17 00:00:00 2001 From: jekuaitk Date: Wed, 8 Apr 2026 13:37:53 +0200 Subject: [PATCH 2/2] Updated CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a62b88..ff23991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ before starting to add changes. Use example [placed in the end of the page](#exa ## [Unreleased] +- [PR-322](https://github.com/OS2Forms/os2forms/pull/322) + Update Digital Post handler error messages. - [PR-320](https://github.com/OS2Forms/os2forms/pull/320) Update README. - [PR-301](https://github.com/OS2Forms/os2forms/pull/301)