From 94ccfb9687cfdef06ffb523deba5b4bdf0b5a120 Mon Sep 17 00:00:00 2001 From: "David M. Johnson" Date: Mon, 23 Nov 2026 16:51:32 -0500 Subject: [PATCH] Keep the comment filter working after editing a comment Saving an edited comment used up the page's form token and refreshed it only in the comments form, so the filter form then posted a spent token and failed. Refresh every form token on the page. --- CHANGES.md | 3 +++ app/src/main/webapp/WEB-INF/jsps/editor/Comments.jsp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 64bff932f..07a2cb0ef 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -108,6 +108,9 @@ ### Bug fixes +- **The comment filter works after editing a comment.** Saving a comment + on the Comments page left the filter form with a used-up form token, so + filtering then failed with an error. - **Media filenames keep their punctuation** when inserted into an entry. - **Changing a password ends the account's other sessions.** Saving a new password in the profile, an administrator's reset, or disabling an account diff --git a/app/src/main/webapp/WEB-INF/jsps/editor/Comments.jsp b/app/src/main/webapp/WEB-INF/jsps/editor/Comments.jsp index 04d8fbe61..d3cbf788c 100644 --- a/app/src/main/webapp/WEB-INF/jsps/editor/Comments.jsp +++ b/app/src/main/webapp/WEB-INF/jsps/editor/Comments.jsp @@ -462,7 +462,8 @@ try { var cdata = JSON.parse(rdata); if (cdata.salt) { - $("#comments_salt").val(cdata.salt); + // the save used up the page's salt; every form on the page shares it + $("input[name='salt']").val(cdata.salt); } return cdata; } catch (error) {