サイトナビゲーションメニューが編集できない

問題

  • サイトナビゲーションメニューが編集できなくなり、開くとエラーメッセージとログに例外が表示されることに気づきました: <Menu> is temporarily unavailable.
java.lang.NullPointerException: null
at com.liferay.site.navigation.admin.web.internal.display.context.SiteNavigationAdminDisplayContext._getDefaultDDMTemplateKey(SiteNavigationAdminDisplayContext.java:483) ~[?:?]
at com.liferay.site.navigation.admin.web.internal.display.context.SiteNavigationAdminDisplayContext.lambda$_getDDMTemplatesJSONArray$10(SiteNavigationAdminDisplayContext.java:458) ~[?:?]
at com.liferay.portal.json.JSONObjectImpl.put(JSONObjectImpl.java:357) ~[portal-impl.jar:?]
at com.liferay.site.navigation.admin.web.internal.display.context.SiteNavigationAdminDisplayContext._getDDMTemplatesJSONArray(SiteNavigationAdminDisplayContext.java:453) ~[?:?]
at com.liferay.site.navigation.admin.web.internal.display.context.SiteNavigationAdminDisplayContext.getSiteNavigationContext(SiteNavigationAdminDisplayContext.java:269) ~[?:?]
at org.apache.jsp.edit_005fsite_005fnavigation_005fmenu_jsp._jspService(edit_005fsite_005fnavigation_005fmenu_jsp.java:251) ~[?:?]
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) ~[jasper.jar:9.0.75]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:623) ~[servlet-api.jar:4.0.FR]
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411) ~[jasper.jar:9.0.75]
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) ~[jasper.jar:9.0.75]
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377) ~[jasper.jar:9.0.75]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:623) ~[servlet-api.jar:4.0.FR]
at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:328) ~[?:?]
at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:340) ~[?:?]
at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153) ~[?:?]
at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:63) ~[?:?]
at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120) ~[?:?]
at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48) ~[?:?]
at com.liferay.portlet.internal.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:291) ~[portal-impl.jar:?]
at com.liferay.portlet.internal.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:123) ~[portal-impl.jar:?]

環境

  • Liferay DXP 7.4

解像度

  • 以下のスクリプトを使用して、問題の場所を確認することができます:
import com.liferay.portal.kernel.template.TemplateHandler;
import com.liferay.portal.kernel.template.TemplateHandlerRegistryUtil;
import com.liferay.portal.kernel.util.PortalUtil;
import com.liferay.portal.kernel.theme.NavItem;

TemplateHandler templateHandler = TemplateHandlerRegistryUtil.getTemplateHandler(PortalUtil.getClassNameId(NavItem.class));
out.println("key='"+templateHandler.getDefaultTemplateKey()+"'");
  • 出力が key=''. の場合、おそらく ナビゲーション・メニューDDMテンプレートが空の値に設定されています
  • システム設定 > ナビゲーション > ナビゲーションメニューテンプレート > DDMテンプレートキーデフォルトにアクセスし、設定をデフォルト値(navbar-blank-ftl)にリセット
この記事は役に立ちましたか?
0人中0人がこの記事が役に立ったと言っています