From 06fdf2915d69a6da454ce40136d70b5531a869ed Mon Sep 17 00:00:00 2001 From: jekuaitk Date: Fri, 26 Jun 2026 12:40:16 +0200 Subject: [PATCH 1/2] 336: Avoided inheriting data on page transition --- .../src/Plugin/EngineTasks/MaestroWebformInheritTask.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/os2forms_forloeb/src/Plugin/EngineTasks/MaestroWebformInheritTask.php b/modules/os2forms_forloeb/src/Plugin/EngineTasks/MaestroWebformInheritTask.php index 9544cee5..dd25f1cd 100644 --- a/modules/os2forms_forloeb/src/Plugin/EngineTasks/MaestroWebformInheritTask.php +++ b/modules/os2forms_forloeb/src/Plugin/EngineTasks/MaestroWebformInheritTask.php @@ -144,6 +144,13 @@ public function prepareTaskForSave(array &$form, FormStateInterface $form_state, * Implements hook_webform_submission_form_alter(). */ public static function webformSubmissionFormAlter(array &$form, FormStateInterface $formState, string $formId) { + // Only inherit values on the initial form load. This skip condition is the + // complement of webform's own prepopulate guard. + // @see \Drupal\webform\WebformSubmissionForm::buildForm() + if ($formState->isRebuilding() && !$formState->get('is_ajax_restart')) { + return; + } + // @todo Clean up and align with MaestroHelper::maestroZeroUserNotification(). if ($queueID = self::getQueueIdFromRequest()) { $templateTask = MaestroEngine::getTemplateTaskByQueueID($queueID); From badc51ff531bf4cba2316afa0b6c1a59b2aac008 Mon Sep 17 00:00:00 2001 From: jekuaitk Date: Fri, 26 Jun 2026 12:51:31 +0200 Subject: [PATCH 2/2] 336: Updated CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ddc05ab..5ba5db8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ before starting to add changes. Use example [placed in the end of the page](#exa ## [Unreleased] +- [337](https://github.com/OS2Forms/os2forms/pull/337) + Avoid inheriting data on page transition in MaestroWebformInheritTask. + ## [5.1.0] 2026-06-03 - [PR-326](https://github.com/OS2Forms/os2forms/pull/326)