[ 
http://jira.magnolia.info/browse/MAGNOLIA-2040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vincent Faidherbe updated MAGNOLIA-2040:
----------------------------------------

    Priority: Minor  (was: Major)

> Resource.getLocalContentNode() causes unexpected NullPointerException
> ---------------------------------------------------------------------
>
>                 Key: MAGNOLIA-2040
>                 URL: http://jira.magnolia.info/browse/MAGNOLIA-2040
>             Project: Magnolia
>          Issue Type: Bug
>          Components: templating
>    Affects Versions: 3.5.3, 3.5.4
>         Environment: Windows XP, Java 1.5, Tomcat 5.5.25
>            Reporter: Vincent Faidherbe
>            Assignee: Philipp Bracher
>            Priority: Minor
>
> The following code doesn't work. It causes a NullPointException  :
> {code:xml}
> <cms:contentNodeIterator items="${sectionArticles}">
>             <cms:includeTemplate />
>             <%
>                 Content parent = 
> Resource.getLocalContentNode().getAncestor(3);
>             %>
>             <p class="blogline blogfoot"><span class="blogitem">Rubrique:
>             <a href="<%= request.getContextPath() + 
> parent.getHandle()+".html"%>"><%= parent.getTitle() %></a></span></p>
> </cms:contentNodeIterator>
> {code}
> It appears that Resource.getLocalContentNode() returns null when call after a 
> <cms:includeTemplate /> tag because the following code works fine:
> {code:xml} 
> <cms:contentNodeIterator items="${sectionArticles}">
>             <%
>                 Content parent = 
> Resource.getLocalContentNode().getAncestor(3);
>             %>
>             <cms:includeTemplate />
>             <p class="blogline blogfoot"><span class="blogitem">Rubrique:
>             <a href="<%= request.getContextPath() + 
> parent.getHandle()+".html"%>"><%= parent.getTitle() %></a></span></p>
>  </cms:contentNodeIterator>
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------

Reply via email to