-
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 widget
-
Labels:None
-
Fix Priority:3
-
Git Pull Request:
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)