snoopdave opened a new pull request, #232:
URL: https://github.com/apache/roller/pull/232

   Hi, it's me Dave. If a weblog is set to a shared theme that is not installed 
(for example a database copied from another server, or a theme removed in an 
upgrade), the theme page fails with a 500 and the weblog page logs a 
NullPointerException. This PR fixes that:
   
   - The theme page loads, says the weblog's theme is not installed, and offers 
the installed themes. Update Theme then switches the weblog to the chosen one.
   - The weblog page logs one line naming the weblog and the missing theme, and 
returns 404 as before, without a NullPointerException.
   - Other code that calls `Weblog.getTheme()` without a null check is 
unchanged.
   
   Tested on Tomcat 11 against a copy of the rollerweblogger.org database, 
using a weblog set to a theme that is not installed: the theme page showed the 
message, saving switched the weblog to Basic, and the weblog page then 
rendered. I checked this with curl, not a browser, so the JSP change that 
proposes the selected theme on page load is untested. No automated tests were 
added.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to