legacy-knowledge-base
公開されました Jun. 30, 2025

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

written-by

István Gergely-Tárnoki

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • サイトナビゲーションメニューが編集できなくなり、開くとエラーメッセージとログに例外が表示されることに気づきました: <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)にリセット
did-this-article-resolve-your-issue

legacy-knowledge-base