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

Add KB display to page then visit by guest throws exceptions

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 7.0.0 Alpha 3
    • Fix Version/s: 7.0.0 Alpha 3
    • Component/s: Knowledge Base
    • Labels:
      None

      Description

      Steps to Reproduce

      1. Deploy the KB portlet
      2. Add a KB article.
      3. Add 'KB display' in page.
      4. log out. then refresh page.

      Results of Testing

      Expected Result: No matter the KB article shows or not. There's no exception on console.
      Actual Result:

      09:30:47,883 ERROR [http-bio-8088-exec-6][IncludeTag:128] Current URL /web/guest generates exception: An exception occurred processing JSP page /admin/common/view_article.jsp at line 27__24: _25: 	KBArticleLocalServiceUtil.updateViewCount(themeDisplay.getUserId(), kbArticle.getResourcePrimKey(), latestKBArticle.getViewCount() + 1);_26: _27: 	AssetEntryServiceUtil.incrementViewCounter(KBArticle.class.getName(), latestKBArticle.getClassPK());_28: }_29: %>_30: ___Stacktrace: [Sanitized]
      com.liferay.portal.security.auth.PrincipalException$MustHavePermission: User  must have VIEW permission for com.liferay.knowledgebase.model.KBArticle 
      	at com.liferay.portlet.asset.service.permission.AssetEntryPermission.check(AssetEntryPermission.java:59)
      	at com.liferay.portlet.asset.service.impl.AssetEntryServiceImpl.incrementViewCounter(AssetEntryServiceImpl.java:139)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:93)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
      	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.liferay.portlet.asset.service.AssetEntryServiceUtil.incrementViewCounter(AssetEntryServiceUtil.java:88)
      	at org.apache.jsp.admin.common.view_005farticle_jsp._jspService(view_005farticle_jsp.java:430)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)
      	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
      	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      

        Attachments

          Activity

            People

            • Assignee:
              ian.song Ian Song (Inactive)
              Reporter:
              bejond.shao Bejond Shao (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

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

                Packages

                Version Package
                7.0.0 Alpha 3