Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-65158

Trash - Portal crashes when wiki page with duplicate name is restored from Recycle Bin

    Details

      Description

      Steps to reproduce:

      1. Add a wiki page called "wiki page 1"
      2. Delete the wiki page
      3. Add another wiki page called "wiki page 1"
      4. Go to Recycle Bin
      5. Click Restore for the "wiki page 1" entry
      6. When the iframe appears, select "Keep both entries and rename the entry from the Recycle Bin as:"
      7. Type "wiki page 1" into the text field
      8. Click save

      Expected result:
      Some constraint should disallow the user from restoring the entry because it is a duplicate title. Maybe an error message could appear.

      Actual result:
      Portal breaks. Console errors are thrown.

      Caused by: com.liferay.trash.kernel.exception.NoSuchEntryException: No TrashEntry exists with the key {classNameId=29802, classPK=30942}
              at com.liferay.portlet.trash.service.persistence.impl.TrashEntryPersistenceImpl.findByC_C(TrashEntryPersistenceImpl.java:2245)
              at com.liferay.portlet.trash.service.impl.TrashEntryLocalServiceImpl.getEntry(TrashEntryLocalServiceImpl.java:342)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:497)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy115.getEntry(Unknown Source)
              at com.liferay.wiki.service.impl.WikiPageLocalServiceImpl.movePageFromTrash(WikiPageLocalServiceImpl.java:2811)
              at com.liferay.wiki.service.impl.WikiPageLocalServiceImpl.restorePageFromTrash(WikiPageLocalServiceImpl.java:1820)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:497)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy433.restorePageFromTrash(Unknown Source)
              at com.liferay.wiki.trash.WikiPageTrashHandler.restoreTrashEntry(WikiPageTrashHandler.java:387)
              at com.liferay.portlet.trash.service.impl.TrashEntryServiceImpl.restoreEntry(TrashEntryServiceImpl.java:418)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:497)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy193.restoreEntry(Unknown Source)
              at com.liferay.trash.web.portlet.TrashPortlet.restoreRename(TrashPortlet.java:245)
              at com.liferay.trash.web.portlet.TrashPortlet.restoreEntry(TrashPortlet.java:203)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:497)
              at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:184)
              ... 175 more
      21:53:53,064 ERROR [http-nio-8080-exec-1][render_portlet_jsp:131] null
      com.liferay.trash.kernel.exception.NoSuchEntryException: No TrashEntry exists with the key {classNameId=29802, classPK=30942}
              at com.liferay.portlet.trash.service.persistence.impl.TrashEntryPersistenceImpl.findByC_C(TrashEntryPersistenceImpl.java:2245)
              at com.liferay.portlet.trash.service.impl.TrashEntryLocalServiceImpl.getEntry(TrashEntryLocalServiceImpl.java:342)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.liferay.wiki.service.impl.WikiPageLocalServiceImpl.movePageFromTrash(WikiPageLocalServiceImpl.java:2811)
              at com.liferay.wiki.service.impl.WikiPageLocalServiceImpl.restorePageFromTrash(WikiPageLocalServiceImpl.java:1820)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.liferay.wiki.trash.WikiPageTrashHandler.restoreTrashEntry(WikiPageTrashHandler.java:387)
              at com.liferay.portlet.trash.service.impl.TrashEntryServiceImpl.restoreEntry(TrashEntryServiceImpl.java:418)
      

      Reproduced on:
      Tomcat 8.0.32 + MySQL 5.6.
      Portal master GIT ID: 11c5aa284f55b35b4ee6945c7f83c2b242519467

        Attachments

          Activity

            People

            • Assignee:
              austin.chiang Austin Chiang
              Reporter:
              austin.chiang Austin Chiang
              Participants of an Issue:
              Recent user:
              Esther Sanz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 30 weeks, 3 days ago

                Packages

                Version Package
                7.0.1 CE GA2