From 7d7326da41e2cdd06347d7a33e8fd33c2a33e939 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Sun, 15 Nov 2026 18:23:09 -0700 Subject: [PATCH] Don't log an error when a weblog's theme has no stylesheet StylesheetEdit threw and logged an exception with a stack trace each time the Stylesheet page opened for a shared theme without a stylesheet, which the page already explains to the user. It now logs that at debug level; real lookup failures still log an error. --- .../roller/weblogger/ui/struts2/editor/StylesheetEdit.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/StylesheetEdit.java b/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/StylesheetEdit.java index 1dcc80ef8..52414b2ea 100644 --- a/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/StylesheetEdit.java +++ b/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/StylesheetEdit.java @@ -89,8 +89,11 @@ public void myPrepare() { stylesheet = getActionWeblog().getTheme().getStylesheet(); } - if(stylesheet == null) { - throw new WebloggerException("no stylesheet found"); + if (stylesheet == null) { + // not every theme has a stylesheet, and the page explains that, + // so this is not an error + log.debug("No stylesheet in the theme of weblog " + getActionWeblog().getHandle()); + return; } WeblogManager weblogManager = WebloggerFactory.getWeblogger().getWeblogManager();