Fórum

[Solved] After Upgrade to 5.2.3 can't see and add comments in Blog

stefanie radtke, modificado 14 Anos atrás.

[Solved] After Upgrade to 5.2.3 can't see and add comments in Blog

Regular Member Postagens: 103 Data de Entrada: 19/03/09 Postagens Recentes
Hallo everyone!

I have yust made a automatic update from Liferay 5.2.2 to 5.2.3. Now I can't see the old comments in my Blog Entrys (DB MySQL Liferay bundled Version 5.2.3 with Tomcat 5.5). Furthermore it ist not possible to create a new comment for the Blogentry the Add Comment Link is not shown. I can see the headline Comments but direktly after this is the Trackback Links. In my Wiki the Comment Funktion works correct!

Can anybody help me with this issue I don't know the problem!!

Thanks!
thumbnail
Aritz Galdos, modificado 14 Anos atrás.

RE: After Upgrade to 5.2.2 can't see and add comments in Blog

Expert Postagens: 416 Data de Entrada: 15/05/07 Postagens Recentes
Does your tomcat's log say something?
stefanie radtke, modificado 14 Anos atrás.

RE: After Upgrade to 5.2.3 can't see and add comments in Blog

Regular Member Postagens: 103 Data de Entrada: 19/03/09 Postagens Recentes
Yes I've found something in logfile!


09:54:36,213 ERROR [[jsp]:711] Servlet.service() for servlet jsp threw exception
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:571)
        at java.util.ArrayList.get(ArrayList.java:349)
        at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.getDiscussionMessageDisplay(MBMessageLocalServiceImpl.java:834)
        at sun.reflect.GeneratedMethodAccessor951.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy106.getDiscussionMessageDisplay(Unknown Source)
        at com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil.getDiscussionMessageDisplay(MBMessageLocalServiceUtil.java:289)
        at org.apache.jsp.html.taglib.ui.discussion.page_jsp._jspService(page_jsp.java:821)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:584)
        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497)
        at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:67)
        at org.apache.jsp.html.portlet.blogs.view_005fentry_jsp._jspService(view_005fentry_jsp.java:2569)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:584)
        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497)
        at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:67)
        at org.apache.jsp.html.common.themes.portlet_jsp._jspService(portlet_jsp.java:3429)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
...

Are the comments stored in the database or something else?
stefanie radtke, modificado 14 Anos atrás.

RE: After Upgrade to 5.2.3 can't see and add comments in Blog

Regular Member Postagens: 103 Data de Entrada: 19/03/09 Postagens Recentes
Has nobody informations about this problem? I need help!!!
thumbnail
Amos Fong, modificado 14 Anos atrás.

RE: After Upgrade to 5.2.3 can't see and add comments in Blog

Liferay Legend Postagens: 2047 Data de Entrada: 07/10/08 Postagens Recentes
Hi Stefanie,

There was a bug which accidentally deleted comments thinking that they were duplicates...You'll need to reload your backup database to restore all comments and patch up 5.2.3 before you run the update again.
stefanie radtke, modificado 14 Anos atrás.

RE: After Upgrade to 5.2.3 can't see and add comments in Blog

Regular Member Postagens: 103 Data de Entrada: 19/03/09 Postagens Recentes
Can you tell me where in the database are the comments saved? I guess I have found the lost Comments in MBMessage with a N/A Entry in Subject. Is there no chance to get them back? Before I have to reload the old system I want to run my new system without the old comments.

Can somebody tell me what settings are necessary to get back the comments function in blog. Since the update I have no chance to make new comments in all Blogs.

Thanks and regarding!

Steffi!!
thumbnail
Amos Fong, modificado 14 Anos atrás.

RE: After Upgrade to 5.2.3 can't see and add comments in Blog

Liferay Legend Postagens: 2047 Data de Entrada: 07/10/08 Postagens Recentes
Hm...you know, it might be possible to recover your deleted comments and re-insert them...I dunno if that's the best idea though.

So alittle db background for understanding:

Each blog entry/wiki page/etc. has an MBDiscussion entry for comments.
The MBDiscussion points to an MBThread.
The MBthreads point to the MBMessages (which are the actual comments).

So this update accidentally deletes the MBThread and MBMessages leaving the MBdiscussion pointing to a non-existent thread.

So to fix the new system without recovering the comments, delete all the orphaned mbdiscussions (new ones will automatically be created with new threads).

Select * from mbdiscussion where threadid not in (select threadid from mbthread);


To recover them, you could do what I said above, or perhaps find the all the mbthreads and mbmessages that are linked to the orphaned mbdiscussions and reinsert them into the database. (this might not be too hard with the correct SQL statements)

Hope that wasn't too confusing/complicated
Amos
stefanie radtke, modificado 14 Anos atrás.

RE: After Upgrade to 5.2.3 can't see and add comments in Blog

Regular Member Postagens: 103 Data de Entrada: 19/03/09 Postagens Recentes
Thanks for the fast answer!

I have checked my tables with one lost comment! I found an entry with the tread id of MBMessages in MBDiscussion but not in MBThread. I have recovered the MBThread Entry but the comment is not shown.

The bigger problem I have is that the Link Add Comment is not shown on all Blog Entry's so it is not possible to create new comments for a blog entry. How can I fix this big problem???
thumbnail
Amos Fong, modificado 14 Anos atrás.

RE: After Upgrade to 5.2.3 can't see and add comments in Blog

Liferay Legend Postagens: 2047 Data de Entrada: 07/10/08 Postagens Recentes
I have checked my tables with one lost comment! I found an entry with the tread id of MBMessages in MBDiscussion but not in MBThread. I have recovered the MBThread Entry but the comment is not shown.


There's also MBMessage entries that need to be recovered too. Find the MBMessage entries that have the threadId.

The bigger problem I have is that the Link Add Comment is not shown on all Blog Entry's so it is not possible to create new comments for a blog entry. How can I fix this big problem???


The way to solve this problem would be delete the orphaned MBdiscussion so they will be recreated.

Delete from MBDiscussion where threadid not in (Select threadId from mbthread);


However this will make it harder to recover your comments because new MBDiscussion, MBThread and MBMessage entries will be created.
stefanie radtke, modificado 14 Anos atrás.

RE: After Upgrade to 5.2.3 can't see and add comments in Blog

Regular Member Postagens: 103 Data de Entrada: 19/03/09 Postagens Recentes
Thanks for the big big help! I found out how to recover my comments and you are right I have to recover the entrys of MBMessage and MBThread. After that my old comments are displayed and I can add new Comments!

Thanks again for your explanations!
thumbnail
Amos Fong, modificado 14 Anos atrás.

RE: After Upgrade to 5.2.3 can't see and add comments in Blog

Liferay Legend Postagens: 2047 Data de Entrada: 07/10/08 Postagens Recentes
Nice! and no Problem =)