Skip to content

Don't log an error when a weblog's theme has no stylesheet - #289

Merged
snoopdave merged 1 commit into
apache:masterfrom
mraible:quiet-missing-stylesheet-log
Nov 16, 2026
Merged

snoopdave merged 1 commit into
apache:masterfrom
mraible:quiet-missing-stylesheet-log

Conversation

@mraible

@mraible mraible commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Opening Design > Stylesheet for a weblog whose shared theme has no stylesheet logged ERROR StylesheetEdit - Error looking up stylesheet on weblog - <handle> with a stack trace, every time. StylesheetEdit.myPrepare() threw a WebloggerException("no stylesheet found") only to catch and log it, while the page itself already tells the user the theme has no stylesheet.

It now logs that case at debug level and returns, leaving the template null exactly as before, so the page behaves the same. Real lookup failures still log an error with the exception.

Found on a copy of raibledesigns.com while testing 7.0.0 RC1.

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.
@mraible
mraible requested a review from snoopdave November 16, 2026 01:23

@snoopdave snoopdave left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always better to make error visible

@snoopdave
snoopdave self-requested a review November 16, 2026 01:50
@snoopdave
snoopdave merged commit 3197488 into apache:master Nov 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants