Details
-
Bug
-
Resolution: Outdated
-
Major
-
None
-
None
-
None
Description
I've mapped up cms bypasses so that struts pages (*.do) are not handled by Magnolia. Note that my bypass is in "cms" in the filter chain, I do want all of the Magnolia chain, but not the actual content (since I'm generating navigation elements that depends on the Magnolia context being in place).
So the below error occurs since we're currently looking at a URL and using <cms:out> on a jsp page that is not generated by Magnolia.
The tag that fails is:
<cms:out nodeDataName="title"/>
2008-12-08 09:19:14.078::WARN: /pbWebapp/common/welcome.do
java.lang.NullPointerException
at info.magnolia.cms.taglibs.Out.doEndTag(Out.java:374)
at org.apache.jsp.common.welcome_jsp._jspx_meth_cms_out_2(org.apache.jsp.common.welcome_jsp:1938)
at org.apache.jsp.common.welcome_jsp._jspx_meth_c_if_1(org.apache.jsp.common.welcome_jsp:1821)
at org.apache.jsp.common.welcome_jsp.access$2(org.apache.jsp.common.welcome_jsp:1785)
Since there is no current Magnolia page, Resource.getActivePage() returns null which means getHandle() is causing the NPE.
I have implemented the obvious quick fix but I wonder if it's correct. It just bypasses the UUID resolving if Resource.getActivePage() is null. However I suspect one would really want the resolving to happen also when there is no current active page - thoughts?