8 Replies Latest reply on Apr 10, 2007 8:06 AM by jcims

    Delete all discussion messages for a user fails

      Trying to delete all messages associated with a user via:

       

      1. Search for user

      2. Click on user's "Messages" in "Activity" row in "User Properties" page.

      3. Scroll down to bottom of listed messages and select "Do not delete replies to the selected messages. Instead, delete the message and bump up the replies." checkbox.

      4. Then click on "Delete All Messages" button.

       

      Clearspace responds with:

       

      "Jive Clearspace

      Clearspace Admin Error  

      Cannot delete the root message using this delete mode."

       

      Even if we try to only delete one message we get the same error. Can you advise ?

       

      Thanks, Shaun.

        • Re: Delete all discussion messages for a user fails

          OKay, playing with this further reveals that the "Delete All Messages" will produce the error described in my previous post if the user has created new discussions as well as replied to discussions.

           

          As there is no way of sorting the list of messages to seperate "created messages" from "replied to messages", the only way to delete all user messages is to wade through all the user's messgages page by page and delete them manually.

           

          This is obviously very very time consuming, unless you can advise us of an alternative method.

            • Re: Delete all discussion messages for a user fails

              We chose to delete the user's messages but keep replies. This seems to be causing the issue as any post the user created can't be deleted in this manner.

               

              So we had to delete all messages the user "replied to" but keeping other user's replies.

               

              Then we had to delete all messgaes the user "created" AND delete the other user's replies.

               

              The end result is the same though, we still had to wade through all the users messages page by page to achieve this.

               

              One suggested solution would be to be able to list all messages the user "created" first, followed by all messages the user "replied to". This would enable all messages to be deleted in two operations rather than N operations (where N = number of pages of user's messages).

                • Re: Delete all discussion messages for a user fails

                  What version of Clearspace are you using? I was unable to reproduce the error that you received when trying to delete discussion posts.

                   

                  One thing to not that the "Delete All Messages" will delete all listed messages. This deletion mode does not take into account any of the "Delete Selected" options.

                   

                  It seems like you could accomplish what your after by selecting all the users posts then "Do not delete replies" and "Delete Selected"

                   

                  Cheers,

                  Nate

              • Re: Delete all discussion messages for a user fails

                Hi Shaun -

                I've tracked this down - and filed it here: http://www.jivesoftware.com/issues/browse/CS-819

                 

                I agree it would be useful to split replies and initial posts into different lists. I'd be interested to know more about what behavior would be desirable when deleting an initial post with the 'don't delete replies' option checked. Kind of a weird case. Should we just nuke the whole thread anyway? We could take the first child and make it the root message, but it might not make sense without the context of the original initial post. I think the first option is probably better, but we're open to suggestions on this one.

                -pete

                  • Re: Delete all discussion messages for a user fails

                    I agree with you pete, sequence should be:

                     

                    1. Order discussions by user "created" first and only provide option to nuke discusion

                     

                    2. Order discussions by user "participated" and only provide option to nuke user's post but not any subsequent posts from other users.

                     

                    This makes sense to me...what do you think ?

                      • Re: Delete all discussion messages for a user fails

                        After managing to delete all messages by USER-X, other users encounter the following stack trace when trying to view a blog in which USER-X had left a comment:

                         

                        This is the error-report:

                         

                         

                        <code>* Status Code: 500</code>

                         

                        <code>* Exception Type: null</code>

                         

                        <code>* Error Message:</code>

                         

                        <code>* Request URI: /clearspace/blogs/seamusflanagan/2007/03/29/updates-from-seamusf</code>

                         

                        <code>* Stack Trace:</code>

                         

                            *

                                  o freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)

                                  o freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)

                                  o freemarker.core.Dot._getAsTemplateModel(Dot.java:78)

                                  o freemarker.core.Expression.getAsTemplateModel(Expression.java:89)

                                  o freemarker.core.BuiltIn$existsBI._getAsTemplateModel(BuiltIn.java:636)

                                  o freemarker.core.BuiltIn$existsBI.isTrue(BuiltIn.java:647)

                                  o freemarker.core.IfBlock.accept(IfBlock.java:80)

                                  o freemarker.core.Environment.visit(Environment.java:196)

                                  o freemarker.core.MixedContent.accept(MixedContent.java:92)

                                  o freemarker.core.Environment.visit(Environment.java:196)

                                  o freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160)

                                  o freemarker.core.Environment.visit(Environment.java:351)

                                  o freemarker.core.IteratorBlock.accept(IteratorBlock.java:95)

                                  o freemarker.core.Environment.visit(Environment.java:196)

                                  o freemarker.core.MixedContent.accept(MixedContent.java:92)

                                  o freemarker.core.Environment.visit(Environment.java:196)

                                  o freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)

                                  o freemarker.core.Environment.visit(Environment.java:196)

                                  o freemarker.core.MixedContent.accept(MixedContent.java:92)

                                  o freemarker.core.Environment.visit(Environment.java:196)

                                  o freemarker.core.Macro$Context.runMacro(Macro.java:164)

                                  o freemarker.core.Environment.visit(Environment.java:537)

                                  o freemarker.core.UnifiedCall.accept(UnifiedCall.java:128)

                                  o freemarker.core.Environment.visit(Environment.java:196)

                                  o freemarker.core.MixedContent.accept(MixedContent.java:92)

                                  o freemarker.core.Environment.visit(Environment.java:196)

                                  o freemarker.core.Environment.include(Environment.java:1375)

                                  o freemarker.core.Include.accept(Include.java:155)

                                  o freemarker.core.Environment.visit(Environment.java:196)

                                  o freemarker.core.MixedContent.accept(MixedContent.java:92)

                                  o freemarker.core.Environment.visit(Environment.java:196)

                                  o freemarker.core.Environment.process(Environment.java:176)

                                  o freemarker.template.Template.process(Template.java:232)

                                  o com.opensymphony.webwork.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:153)

                                  o com.jivesoftware.community.web.webwork.FreemarkerResult.doExecute(FreemarkerResult.java:124)

                                  o com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:143)

                                  o com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:311)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:206)

                                  o com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.jivesoftware.community.web.webwork.FlashInterceptor.intercept(FlashInterceptor.java:41)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:168)

                                  o com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.opensymphony.xwork.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:115)

                                  o com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.jivesoftware.community.web.webwork.JiveObjectLoaderInterceptor.intercept(JiveObjectLoaderInterceptor.java:55)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.opensymphony.webwork.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:171)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.opensymphony.xwork.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:151)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.jivesoftware.community.web.webwork.JiveIOCInterceptor.intercept(JiveIOCInterceptor.java:512)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.jivesoftware.community.web.webwork.JiveLoginInterceptor.intercept(JiveLoginInterceptor.java:42)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.jivesoftware.community.web.webwork.AuthInterceptor.intercept(AuthInterceptor.java:41)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.jivesoftware.community.action.LocaleInterceptor.intercept(LocaleInterceptor.java:52)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.opensymphony.xwork.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:186)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.jivesoftware.community.web.webwork.ModuleCheckInterceptor.intercept(ModuleCheckInterceptor.java:49)

                                  o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)

                                  o com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:113)

                                  o com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:225)

                                  o com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202)

                                  o com.jivesoftware.community.web.webwork.JiveFilterDispatcher.doFilter(JiveFilterDispatcher.java:53)

                                  o org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

                                  o org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

                                  o com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)

                                  o com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)

                                  o org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

                                  o org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

                                  o com.jivesoftware.community.web.JiveActionContextCleanUp.doFilter(JiveActionContextCleanUp.java:46)

                                  o org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

                                  o org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

                                  o org.directwebremoting.servlet.DwrWebContextFilter.doFilter(DwrWebContextFilter.java:91)

                                  o org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

                                  o org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

                                  o com.jivesoftware.base.database.dao.DAOContextCleanUpFilter.doFilter(DAOContextCleanUpFilter.java:32)

                                  o org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

                                  o org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

                                  o org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

                                  o org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

                                  o org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

                                  o org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

                                  o org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

                                  o org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

                                  o org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

                                  o org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

                                  o org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

                                  o org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

                                  o org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

                                  o java.lang.Thread.run(Unknown Source)

                         

                        <code>* freemarker.core.InvalidReferenceException:

                        Expression comment.user is undefined on line 44, column 22 in

                        template/blogs/blog-macros.ftl.</code>

                          • Re: Delete all discussion messages for a user fails

                            I've noticed a general tendency for any template that has a problem to 'blow up big'.  I don't know much about freemarker, but would it be possible to put a bit of exception handling into the stock Clearspace templates so they work in a degraded mode?  For example, in this case it could have just skipped the problematic comment (and possibly thrown the exception to the logger)

                              • Re: Delete all discussion messages for a user fails

                                Looks like you can implement a custom TemplateException class to moderate the error handling during template execution

                                 

                                http://freemarker.sourceforge.net/docs/pgui_config_errorhandling.html

                                 

                                The cool thing is it will always log the exception, so you can troubleshoot it on the backend.  FreeMarker apparently ships with several different error handling classes:

                                 

                                    *TemplateExceptionHandler.DEBUG_HANDLER: Prints stack trace (includes FTL error message and FTL stack trace) and re-throws the exception. This is the default handler (that is, it is initially prugged into all new Configuration objects).

                                 

                                    *TemplateExceptionHandler.HTML_DEBUG_HANDLER: Same as DEBUG_HANDLER, but it formats the stack trace so that it will be readable with Web browsers. Recommended over DEBUG_HANDLER when you generate HTML pages.

                                 

                                    *TemplateExceptionHandler.IGNORE_HANDLER: Simply suppresses all exceptions (but remember, FreeMarker will still log them). It does nothing to handle the event. It does not re-throw the exception.

                                 

                                    *TemplateExceptionHandler.RETHROW_HANDLER: Simply re-throws all exceptions, it doesn't do anything else. This handler can be good for Web applications (assuming you don't want to continue template processing after exception), because it gives the most control to the Web application over page generation on error conditions (since FreeMarker doesn't print anything to the output about the error). For more information about handling errors in Web applications see the FAQ."