The Theme is Broken With NPE thrown in the Log

Issue

  • The theme is broken when accessing non-existent pages. NPE is also thrown in the log.
  • Reproduction Steps:

    Access non-existent pages
    http://localhost:8080/web/guest/p/
    Or create a commerce site named "xyz" and access non-existent pages
    http://localhost:8080/group/xyz/p/

    Result:The theme is broken with some JS errors. NPE is thrown in the log.
    2023-02-28 02:19:46.382 ERROR [http-nio-8080-exec-6][IncludeTag:128] Current URL /group/xyz/p/ujoint123 generates exception: null
    java.lang.NullPointerException
    	at com.liferay.portal.util.PortalImpl._getAlternateURLs(PortalImpl.java:8293)
    	at com.liferay.portal.util.PortalImpl.getAlternateURLs(PortalImpl.java:1228)
    	at com.liferay.portal.kernel.util.PortalUtil.getAlternateURLs(PortalUtil.java:376)
    	at org.apache.jsp.html.common.themes.top_005fhead_jsp._jspService(top_005fhead_jsp.java:1237)
    	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:779)
    	at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:64)
    	at com.liferay.portal.servlet.DirectRequestDispatcherFactoryImpl$IndirectRequestDispatcher.include(DirectRequestDispatcherFactoryImpl.java:190)
    	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:79)
    	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
    	at com.liferay.taglib.util.IncludeTag.includePage(IncludeTag.java:407)
    	at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:383)
    	at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:217)
    	at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:88)
    	at freemarker.ext.jsp.TagTransformModel$TagWriter.endEvaluation(TagTransformModel.java:402)
    	at freemarker.ext.jsp.TagTransformModel$TagWriter.afterBody(TagTransformModel.java:390)
    	at freemarker.core.Environment.visitAndTransform(Environment.java:497)
    	at freemarker.core.UnifiedCall.accept(UnifiedCall.java:103)
    	at freemarker.core.Environment.visit(Environment.java:331)
    	at freemarker.core.Environment.visit(Environment.java:337)
    

 

Environment

  • Liferay DXP 7.3

 

Resolution

  • The fix LPS-177132 can resolve the issue. Please request a hotfix to include this fix or install 7.3 Update 69.

 

Additional Information

这篇文章有帮助吗?
0 人中有 0 人觉得有帮助