-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.X, 7.1.X, 7.2.X, Master
-
Fix Version/s: 7.2.10 DXP FP4, 7.2.X, 7.2.1 CE GA2, 7.3.10 DXP GA1, Master
-
Component/s: ~[Archived] WCM
-
Labels:
-
Branch Version/s:7.2.x
-
Backported to Branch:Committed
-
Fix Priority:3
-
Git Pull Request:
Reproduction steps:
- Start latest master bundle
- Create a structure named "struct1"
- Add a Separator to the structure
- Add a Text field embedded into the Separator
- Make the Text field repeatable
- Add a template to "struct1"
- Click on the Text field on the left, and its pattern will be inserted into the template
- Save it and create a web content from "struct1"
- Add 3 values to the repeatable Text field, save the content
- Preview the content (eye icon in the "Default Template" section)
Actual result: an error is shown
An error occurred while processing the template. Syntax error in template "20095#20122#34641" in line 2, column 73: Encountered ".", but was expecting: ">" 1<#if Separatordtf8.Textaoqa.getSiblings()?has_content> 2 <#list Separatordtf8.Textaoqa.getSiblings() as cur_Separatordtf8.Textaoqa> 3 ${cur_Separatordtf8.Textaoqa.getData()} 4 </#list> 5</#if>
Expected: the values of repeatable Text field should be shown correctly. E.g.:
Text1 Text2 Text3
This is the generated FTL template:
<#if Separatordtf8.Textaoqa.getSiblings()?has_content> <#list Separatordtf8.Textaoqa.getSiblings() as cur_Separatordtf8.Textaoqa> ${cur_Separatordtf8.Textaoqa.getData()} </#list> </#if>
When the variable name doesn't contain "." character, it should look like this:
<#if Separatordtf8.Textaoqa.getSiblings()?has_content> <#list Separatordtf8.Textaoqa.getSiblings() as cur_Separatordtf8_Textaoqa> ${cur_Separatordtf8_Textaoqa.getData()} </#list> </#if>
- depends on
-
LPS-90886 Add a webcontent use structure with Web Content field
- Closed
- Testing discovered
-
LPS-103273 Liferay template-editor generates invalid Freemarker code for embedded geolocation fields
- Closed