gregh3269 commented on code in PR #247:
URL: https://github.com/apache/roller/pull/247#discussion_r4562070618


##########
app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java:
##########
@@ -110,6 +114,18 @@ public void removeWeblog(Weblog weblog) throws 
WebloggerException {
         
         // remove contents first, then remove weblog
         this.removeWeblogContents(weblog);
+        
+        // Clear frontpage weblog if set
+        if (WebloggerRuntimeConfig.isFrontPageWeblog(weblog.getHandle())) {
+
+            PropertiesManager mgr = 
WebloggerFactory.getWeblogger().getPropertiesManager();
+
+            RuntimeConfigProperty handleProp = 
mgr.getProperty(FrontpageSettings.HANDLE_PROPERTY);
+
+            mgr.compareAndSetProperty(FrontpageSettings.HANDLE_PROPERTY, 
handleProp.getValue(), "");
+
+        }

Review Comment:
   The handle is blank, so just follows the install logic for the requirement 
of a front page weblog, it forwards to the initial welcome page.  If you don't 
clear the site.frontpage.weblog.handle when deleting you won't get a default 
page to login only a 404 (must use/remember the struts the login url).  
   
   At least now you get a login possibility to enable/adjust the settings as 
admin without having to remember 
http://devbox/roller/roller-ui/login-redirect.rol.
   
   When I test this I have to go and reset site.frontpage.weblog.handle on the 
DB, as my memory is not what it used to be.
   
   <img width="1277" height="669" alt="image" 
src="https://github.com/user-attachments/assets/d2af65e0-7560-40f7-a218-1c5945724ab2";
 />



-- 
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