This is an automated email from the ASF dual-hosted git repository.

mraible pushed a commit to branch keep-comment-plugins
in repository https://gitbox.apache.org/repos/asf/roller.git

commit fb7728d28d0a9e22cfa21a62fb9d096ea193c847
Author: Matt Raible <[email protected]>
AuthorDate: Wed Nov 18 10:37:45 2026 -0700

    Keep the enabled comment plugins checked in Server Admin > Configuration
    
    The comment plugin checkbox list set value="name", which doesn't evaluate 
to the enabled plugin ids, so every box showed unchecked. Saving the page then 
stored an empty plugin list, which turned off HTMLSubset, the default comment 
plugin, and every other comment plugin site-wide. HTML comments were then shown 
escaped. Without the value attribute, the list checks the plugins in 
commentPlugins, which the action loads from users.comments.plugins.
    
    NewUserJourneyIT saves the page to enable uploads and now checks that 
HTMLSubset is checked before and after the save.
---
 app/src/main/webapp/WEB-INF/jsps/admin/GlobalConfig.jsp              | 2 +-
 .../src/test/java/org/apache/roller/playwright/NewUserJourneyIT.java | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/app/src/main/webapp/WEB-INF/jsps/admin/GlobalConfig.jsp 
b/app/src/main/webapp/WEB-INF/jsps/admin/GlobalConfig.jsp
index 53c66d2e3..e0f5459a2 100644
--- a/app/src/main/webapp/WEB-INF/jsps/admin/GlobalConfig.jsp
+++ b/app/src/main/webapp/WEB-INF/jsps/admin/GlobalConfig.jsp
@@ -35,7 +35,7 @@
             <%-- special case for comment plugins --%>
             <s:if test="#pd.name == 'users.comments.plugins'">
                 <s:checkboxlist label="%{getText(#pd.key)}" 
name="commentPlugins"
-                                list="pluginsList" listKey="id" value="name" 
listValue="name"/>
+                                list="pluginsList" listKey="id" 
listValue="name"/>
             </s:if>
 
             <%-- special case for front page blog --%>
diff --git 
a/it-playwright/src/test/java/org/apache/roller/playwright/NewUserJourneyIT.java
 
b/it-playwright/src/test/java/org/apache/roller/playwright/NewUserJourneyIT.java
index 3bcaf421c..2e9d7c17b 100644
--- 
a/it-playwright/src/test/java/org/apache/roller/playwright/NewUserJourneyIT.java
+++ 
b/it-playwright/src/test/java/org/apache/roller/playwright/NewUserJourneyIT.java
@@ -96,6 +96,7 @@ class NewUserJourneyIT extends BaseIT {
     private static final String GLOBAL_CONFIG_PAGE = 
"roller-ui/admin/globalConfig.rol";
     private static final String UPLOADS_ENABLED = 
"input[name='uploads.enabled']";
     private static final String GLOBAL_CONFIG_SAVE = "#saveButton";
+    private static final String HTML_SUBSET_PLUGIN = 
"input[name='commentPlugins'][value='HTMLSubset']";
 
     // media file upload form
     private static final String MEDIA_UPLOAD_PAGE = 
"roller-ui/authoring/mediaFileAdd.rol?weblog=" + BLOG_HANDLE;
@@ -256,9 +257,13 @@ class NewUserJourneyIT extends BaseIT {
 
     private void enableUploads() {
         goTo(GLOBAL_CONFIG_PAGE);
+        // HTMLSubset is the default comment plugin, and saving the page must
+        // keep it enabled
+        assertThat(page.locator(HTML_SUBSET_PLUGIN)).isChecked();
         page.locator(UPLOADS_ENABLED).check();
         page.locator(GLOBAL_CONFIG_SAVE).click();
         assertThat(page.locator(UPLOADS_ENABLED)).isChecked();
+        assertThat(page.locator(HTML_SUBSET_PLUGIN)).isChecked();
     }
 
     private void uploadMediaFile() {

Reply via email to