Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-148896

Freemarker variables are not substituted in fragments with lfr-editable tags or data-lfr-editable-type attributes

Details

    Description

      Reproducing steps (for master, 7.3.X; analogous for 7.2.X)

      1. In a given site, go to Design > Fragments.
      2. Create a new collection and a new fragment.
      3. In the code section add
        [#assign message = "hola"]
        
        <a data-lfr-editable-id="item-link-1" data-lfr-editable-type="link" href="#" >
            ${message}
        </a>
        
        <div data-lfr-editable-id="item-link-2" data-lfr-editable-type="link">
        	<a href="#">
        		${message}
        	</a>
        </div>
        
        <lfr-editable id="unique-id" type="link">
        	<a href="#">
        		${message}
        	</a>
        </lfr-editable>
        

        Expected: The rendered fragment in the lower-right corner shows

        hola
        hola
        hola

        because the FreeMarker variable has been substituted by the assigned string.
        Observed: The FreeMarker variable is not substituted and the following is shown:

        ${message}
        ${message}
        ${message}

      4. Go to Site Builder > Pages and add a new content page.
      5. Add the fragment created above.
        Expected: The following is shown

        hola
        hola
        hola

        because the FreeMarker variable has been substituted by the assigned string.
        Observed: The FreeMarker variable is not substituted and the following is shown:

        ${message}
        ${message}
        ${message}

      6. Publish the page.
      7. Visit the page.
        Expected: The following is shown

        hola
        hola
        hola

        because the FreeMarker variable has been substituted by the assigned string.
        Observed: The FreeMarker variable is not substituted and the following is shown:

        ${message}
        ${message}
        ${message}

      Attachments

        Activity

          People

            brian.chan Brian Chan
            ricardo.couso Ricardo Couso
            Kiyoshi Lee Kiyoshi Lee
            Ricardo Couso Ricardo Couso
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              28 weeks, 2 days ago

              Packages

                Version Package
                7.3.X
                7.4.3.17 CE GA17
                Master