From 8ff3a6ec3103cd2ecef1dae53f69f760b8657409 Mon Sep 17 00:00:00 2001 From: Steve Hanlon Date: Fri, 12 Jun 2026 10:29:33 +0100 Subject: [PATCH] Fix step status+notes save (forms were nested in HTML) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The step card's save form wrapped the entire card, including the autocheck 'Run checks' button and per-step extras like the email 'Send' form — those are also
elements. Nested forms are invalid HTML; browsers silently drop the outer form's submit when they see an inner one. So clicking 'Save step' was effectively a no-op: the POST to wph_save_step never reached the server, and the status reverted to 'not started' on reload. The bug had been there since the autocheck panel was introduced in v0.3 of the healthcheck. Restructured the step card as a
wrapper containing three siblings: (1) static content (title, blurb, sub-items, watch-outs, escalation), (2) the autocheck panel + step render_extra (each with their own forms), (3) the save form. No nesting anywhere. Verified end-to-end on testsite: step status and notes now persist across page loads. The email step (which has 3 sibling forms — refresh checks, send test, save) also renders without nesting. --- includes/admin-page.php | 63 +++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/includes/admin-page.php b/includes/admin-page.php index e8ffedb..40645fc 100644 --- a/includes/admin-page.php +++ b/includes/admin-page.php @@ -272,10 +272,7 @@ function wph_render_step_card(WPH_Session $session, WPH_Step $step): void { $status = $state['status']; $notes = $state['notes']; ?> - - id()); ?> - - +

title()); ?>

@@ -303,29 +300,41 @@ function wph_render_step_card(WPH_Session $session, WPH_Step $step): void { escalation())): ?>
- - render_extra($session->data()); ?> -

- -

-

- - -

-

- - - Last saved ago - -

- + + render_extra($session->data()); + ?> + +
+ id()); ?> + + +

+ +

+

+ + +

+

+ + + Last saved ago + +

+
+