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

Language-Switch-Portlet throws an exception when used after selecting a category from the Categories-Navigation-Portlet

    Details

      Description

      Setup

      1. Create a new Page and place the following portlets on it: Language-Switch, AssetPublisher, Categories Navigation
      2. Create at least one category that can be displayed in the Categories-Navigation
      3. The Language-Switch must display at least 2 languages to switch between

      How to Reproduce

      1. Select a category from the Categories-Navigation. The current URL should now include the string "/-/categories"
      2. Use the Language-Switch to switch to another Language

      Expected Result

      The Same page should be displayed, but with the selected language. Instead the page displays the exception below. It seems that the PortalImpl assumes, that every URL, that contains the seperator "/-/" contains information that represent an Article (PortalImpl:2891). So in this case, the portal tries to load the article with information that describe an AssetCategory. This leads to the exception and a ServletException being thrown.

      rwth-app-1       | 2021-06-14 13:55:08.382 WARN  [http-nio-8080-exec-7][PortalImpl:6632] javax.servlet.ServletException: com.liferay.portal.kernel.exception.NoSuchLayoutException: com.liferay.journal.exception.NoSuchArticleException: No JournalArticle exists with the key {groupId=20124, urlTitle=categories, status=1}
      rwth-app-1       | javax.servlet.ServletException: com.liferay.portal.kernel.exception.NoSuchLayoutException: com.liferay.journal.exception.NoSuchArticleException: No JournalArticle exists with the key {groupId=20124, urlTitle=categories, status=1}
      rwth-app-1       | 	at com.liferay.portal.struts.PortalRequestProcessor._process(PortalRequestProcessor.java:421)
      rwth-app-1       | 	at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:154)
      rwth-app-1       | 	at com.liferay.portal.internal.servlet.MainServlet.doGet(MainServlet.java:204)
      rwth-app-1       | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:626)
      rwth-app-1       | 	at com.liferay.portal.internal.servlet.MainServlet.service(MainServlet.java:620)
      rwth-app-1       | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
      rwth-app-1       | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      rwth-app-1       | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      rwth-app-1       | 	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      rwth-app-1       | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      rwth-app-1       | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:124)
      rwth-app-1       | 	at com.liferay.portal.servlet.filters.password.modified.PasswordModifiedFilter.processFilter(PasswordModifiedFilter.java:62)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      rwth-app-1       | 	at com.liferay.portal.servlet.filters.lockout.LockoutFilter.processFilter(LockoutFilter.java:58)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
      rwth-app-1       | 	at com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:340)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
      rwth-app-1       | 	at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:183)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:104)
      rwth-app-1       | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      rwth-app-1       | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      rwth-app-1       | 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712)
      rwth-app-1       | 	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459)
      rwth-app-1       | 	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384)
      rwth-app-1       | 	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
      rwth-app-1       | 	at com.liferay.portal.servlet.I18nServlet._processI18nData(I18nServlet.java:355)
      rwth-app-1       | 	at com.liferay.portal.servlet.I18nServlet.service(I18nServlet.java:119)
      rwth-app-1       | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
      rwth-app-1       | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      rwth-app-1       | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      rwth-app-1       | 	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      rwth-app-1       | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      rwth-app-1       | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:124)
      rwth-app-1       | 	at com.liferay.portal.servlet.filters.password.modified.PasswordModifiedFilter.processFilter(PasswordModifiedFilter.java:62)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      rwth-app-1       | 	at com.liferay.portal.servlet.filters.lockout.LockoutFilter.processFilter(LockoutFilter.java:58)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
      rwth-app-1       | 	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:248)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
      rwth-app-1       | 	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
      rwth-app-1       | 	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
      rwth-app-1       | 	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
      rwth-app-1       | 	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
      rwth-app-1       | 	at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
      rwth-app-1       | 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:104)
      rwth-app-1       | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      rwth-app-1       | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      rwth-app-1       | 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
      rwth-app-1       | 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      rwth-app-1       | 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
      rwth-app-1       | 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
      rwth-app-1       | 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      rwth-app-1       | 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
      rwth-app-1       | 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      rwth-app-1       | 	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
      rwth-app-1       | 	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
      rwth-app-1       | 	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
      rwth-app-1       | 	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589)
      rwth-app-1       | 	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      rwth-app-1       | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      rwth-app-1       | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      rwth-app-1       | 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      rwth-app-1       | 	at java.base/java.lang.Thread.run(Thread.java:834)
      rwth-app-1       | Caused by: com.liferay.portal.kernel.exception.NoSuchLayoutException: com.liferay.journal.exception.NoSuchArticleException: No JournalArticle exists with the key {groupId=20124, urlTitle=categories, status=1}
      rwth-app-1       | 	at com.liferay.portal.util.PortalImpl.getLayoutFriendlyURLSeparatorComposite(PortalImpl.java:2904)
      rwth-app-1       | 	at com.liferay.portal.kernel.util.PortalUtil.getLayoutFriendlyURLSeparatorComposite(PortalUtil.java:1078)
      rwth-app-1       | 	at com.liferay.portal.action.UpdateLanguageAction.getRedirect(UpdateLanguageAction.java:149)
      rwth-app-1       | 	at com.liferay.portal.action.UpdateLanguageAction.execute(UpdateLanguageAction.java:98)
      rwth-app-1       | 	at com.liferay.portal.struts.PortalRequestProcessor._process(PortalRequestProcessor.java:408)
      rwth-app-1       | 	... 95 more
      rwth-app-1       | Caused by: com.liferay.journal.exception.NoSuchArticleException: No JournalArticle exists with the key {groupId=20124, urlTitle=categories, status=1}
      rwth-app-1       | 	at com.liferay.journal.service.impl.JournalArticleLocalServiceImpl.getLatestArticleByUrlTitle(JournalArticleLocalServiceImpl.java:3439)
      rwth-app-1       | 	at jdk.internal.reflect.GeneratedMethodAccessor691.invoke(Unknown Source)
      rwth-app-1       | 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      rwth-app-1       | 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      rwth-app-1       | 	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
      rwth-app-1       | 	at com.sun.proxy.$Proxy726.getLatestArticleByUrlTitle(Unknown Source)
      rwth-app-1       | 	at com.liferay.journal.service.JournalArticleLocalServiceWrapper.getLatestArticleByUrlTitle(JournalArticleLocalServiceWrapper.java:2322)
      rwth-app-1       | 	at jdk.internal.reflect.GeneratedMethodAccessor691.invoke(Unknown Source)
      rwth-app-1       | 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      rwth-app-1       | 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      rwth-app-1       | 	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
      rwth-app-1       | 	at com.sun.proxy.$Proxy727.getLatestArticleByUrlTitle(Unknown Source)
      rwth-app-1       | 	at jdk.internal.reflect.GeneratedMethodAccessor691.invoke(Unknown Source)
      rwth-app-1       | 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      rwth-app-1       | 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      rwth-app-1       | 	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
      rwth-app-1       | 	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
      rwth-app-1       | 	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      rwth-app-1       | 	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
      rwth-app-1       | 	at com.sun.proxy.$Proxy725.getLatestArticleByUrlTitle(Unknown Source)
      rwth-app-1       | 	at com.liferay.asset.publisher.web.internal.portlet.DefaultAssetDisplayPageFriendlyURLResolver._getJournalArticle(DefaultAssetDisplayPageFriendlyURLResolver.java:430)
      rwth-app-1       | 	at com.liferay.asset.publisher.web.internal.portlet.DefaultAssetDisplayPageFriendlyURLResolver.getLayoutFriendlyURLComposite(DefaultAssetDisplayPageFriendlyURLResolver.java:128)
      rwth-app-1       | 	at com.liferay.portal.kernel.portlet.FriendlyURLResolver.getLayoutFriendlyURLSeparatorComposite(FriendlyURLResolver.java:51)
      rwth-app-1       | 	at com.liferay.portal.util.PortalImpl.getLayoutFriendlyURLSeparatorComposite(PortalImpl.java:2897)
      rwth-app-1       | 	... 99 more
      

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            sebastian.glathe Sebastian Glathe
            Participants of an Issue:
            Recent user:
            Sebastian Glathe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              14 weeks, 1 day ago

                Packages

                Version Package