Details

    • Type: Regression Bug Regression Bug
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: 5.2.X EE, 6.0.12 EE, 6.1.0 CE RC1, 6.1.0 CE GA1, 6.1.1 CE GA2, 6.1.20 EE GA2
    • Fix Version/s: --Sprint 11/12, 6.2.0 CE M2
    • Labels:
    • Environment:
      Tomcat 6.0 + MySQL 5. Firefox 4.0.1. 5.2.x Revision 83112.
      Tomcat 6.0 + MySQL 5. Firefox 4.0.1. 6.0.x Revision 83110.
      Tomcat 6.0 + MySQL 5. Firefox 4.0.1. 6.1.x Revision 83110.
    • Branch Version/s:
      6.0.x, 5.2.x
    • Fix Priority:
      4
    • Similar Issues:
      Show 5 results 

      Description

      When creating a content which has 2 levels depth, it is not possible to access to the second level.

      See attached a structure sample, and template sample. Result is here:

      {name=Detail_SousCompetence, data=

      Detail_SousCompetence1
      , type=text_area, options=[], Nom_Contact={name=Nom_Contact, data=Nom_Contact 1, type=text, options=[], Fonction_Contact=

      {name=Fonction_Contact, data=Fonction_Contact 1, type=text, options=[]}

      , Prenom_Contact=

      {name=Prenom_Contact, data=Prenom_Contact 1, type=text, options=[]}

      , Email_Contact=

      {name=Email_Contact, data=Email_Contact 1, type=text, options=[]}

      , Telephone_Contact=

      {name=Telephone_Contact, data=Telephone_Contact 1, type=text, options=[]}

      }}

      The Nom_Contact field is not an array, allthough it is a repeatable element in the structure.

      After som researches, I found out that the problem is localized here in the code :
      /portal-impl/src/com/liferay/portlet/journal/util/VelocityTemplateParser.java
      Line 75, the call to extractDynamicContents() returns only the first node instead on all children

      1. structure.xml
        4 kB
        frinux
      2. template.xml
        0.8 kB
        frinux
      3. template-solution.xml
        0.8 kB
        Sergio Sanchez

        Activity

        Hide
        Pani Gui (Inactive) added a comment -

        Hi frinux,
        Thank you for your report. I was able to reproduce this issue in Liferay Portal 6.0.11 and our current trunk head. I will update this ticket to reflect this issue.
        1. Create a structure with structure.xml in attachment.
        2. Create a template with template.xml.
        3. Create a web content with the structure and template.
        4. Click "Action" button, then preview it.

        Show
        Pani Gui (Inactive) added a comment - Hi frinux, Thank you for your report. I was able to reproduce this issue in Liferay Portal 6.0.11 and our current trunk head. I will update this ticket to reflect this issue. 1. Create a structure with structure.xml in attachment. 2. Create a template with template.xml. 3. Create a web content with the structure and template. 4. Click "Action" button, then preview it.
        Hide
        Sergio Sanchez added a comment -

        The problem is that as the child is a repeatable element the method getChildren() will return just the first element among all its siblings. So, i every children (if it is a repeatable element) getSiblings() should be called.
        The template to iterate in the structure provided is attached (template-solution.xml)

        Show
        Sergio Sanchez added a comment - The problem is that as the child is a repeatable element the method getChildren() will return just the first element among all its siblings. So, i every children (if it is a repeatable element) getSiblings() should be called. The template to iterate in the structure provided is attached (template-solution.xml)
        Hide
        Niko Humalamäki added a comment -

        I apparrently ran to this same problem, was asking on it at the forum: http://www.liferay.com/community/forums/-/message_boards/message/13120684

        it's 6.1.0 CE GA1, tomcat 7, mysql and firefox 10

        Show
        Niko Humalamäki added a comment - I apparrently ran to this same problem, was asking on it at the forum: http://www.liferay.com/community/forums/-/message_boards/message/13120684 it's 6.1.0 CE GA1, tomcat 7, mysql and firefox 10
        Hide
        Marcellus Tavares added a comment -

        Hi all, I'm closing this ticket as won't fix. As Sergio correctly commented, the way to access the repeatable elements must be done through the getSiblings call.

        Best

        Show
        Marcellus Tavares added a comment - Hi all, I'm closing this ticket as won't fix. As Sergio correctly commented, the way to access the repeatable elements must be done through the getSiblings call. Best

          People

          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 41 weeks ago

              Development

                Structure Helper Panel