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

Polls Display portlet is temporarily unavailable when selected Poll is deleted

    Details

      Description

      Steps to reproduce:

      1. Add new poll
      2. Add Polls Display portlet to page
      3. Assert "Please configure this portlet to make it visible to all users" displays
      4. Configure portlet to display newly added poll
      5. Navigate to Sites > Content > Polls
      6. Delete poll
      7. Go back to page with Polls Display portlet

      Expected result: Same message displays when portlet was not yet configured
      Actual result: Portlet is temporarily unavailable is displayed. Console errors are also thrown:

      Caused by: com.liferay.polls.exception.NoSuchQuestionException: No PollsQuestion exists with the primary key 20834
              at com.liferay.polls.service.persistence.impl.PollsQuestionPersistenceImpl.findByPrimaryKey(PollsQuestionPersistenceImpl.java:2772)
              at com.liferay.polls.service.persistence.impl.PollsQuestionPersistenceImpl.findByPrimaryKey(PollsQuestionPersistenceImpl.java:2789)
              at com.liferay.polls.service.impl.PollsQuestionLocalServiceImpl.getQuestion(PollsQuestionLocalServiceImpl.java:211)
              at sun.reflect.GeneratedMethodAccessor1741.invoke(Unknown Source)
              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.$Proxy386.getQuestion(Unknown Source)
              at com.liferay.polls.service.permission.PollsQuestionPermissionChecker.contains(PollsQuestionPermissionChecker.java:68)
              at com.liferay.polls.service.permission.PollsQuestionPermissionChecker.check(PollsQuestionPermissionChecker.java:44)
              at com.liferay.polls.service.impl.PollsQuestionServiceImpl.getQuestion(PollsQuestionServiceImpl.java:68)
              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.$Proxy389.getQuestion(Unknown Source)
              at com.liferay.polls.service.PollsQuestionServiceUtil.getQuestion(PollsQuestionServiceUtil.java:61)
              at com.liferay.polls.web.portlet.util.PollsUtil.getQuestionByPortlet(PollsUtil.java:58)
              at org.apache.jsp.polls_005fdisplay.view_jsp._jspService(view_jsp:338)
              ... 224 more
      

      Reproduced on:
      Tomcat 8.0.32 + MySQL 5.6
      Liferay ee-7.0.x GIT ID: a0bc50bf3b5639ad1d35eee5574a91aba3e31baf

        Attachments

          Activity

            People

            • Assignee:
              patricia.perez Patricia Perez
              Reporter:
              patricia.perez Patricia Perez
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

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

                Packages

                Version Package
                7.0.0 DXP FP30
                7.0.X EE
                7.0.4 CE GA5
                Master