Site navigation menu can't be edited
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
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- We noticed that our site navigation menu is not editable anymore and it throws an error message and an exception in the logs when we open it:
<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:?]
Resolution
- You can use the below script to check where the issue is:
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()+"'");
- If the output is
key=''., then most probably the Navigation Menu DDM Template is set to an empty value
- Go to System Settings > Navigation > Navigation Menu Template > DDM Template Key Default and reset the configuration to the default value (navbar-blank-ftl)
Did this article resolve your issue ?