-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.1.X, 7.2.X, 7.3.X, Master
-
Fix Version/s: 7.1.10 DXP FP19, 7.1.10.5 SP5, 7.1.X, 7.2.10 DXP FP7, 7.2.X, 7.3.4 CE GA5, 7.3.10 DXP GA1, Master
-
Component/s: Portal Services > Templates Engine
-
Branch Version/s:7.2.x, 7.1.x
-
Backported to Branch:Committed
-
Git Pull Request:
Issue
getOptions method returns nothing so cannot retrieve list of options from Freemarker.
Steps to reproduce
- Start a clean bundle
- Create a new Web Content structure with just one Select field, all with default options
- Create a new Template for that structure (change the variable name accordingly)
Selected value:<br /> ${Select1vi7.getData()}<br /> <br /> Size of getOptionsMap:<br /> ${Select1vi7.getOptionsMap()?size}<br /> Size of getOptions:<br /> ${Select1vi7.getOptions()?size}<br /> <br /> List of getOptionsMap?keys: <br /> <#list Select1vi7.getOptionsMap()?keys as key> ${key}<br /> </#list> <br /> List of getOptions:<br /> <#list Select1vi7.getOptions() as item> ${item}<br /> </#list>
- Create a new Web Content based on that structure
- Preview the content or display it in a site page
Actual results
getOptions do not return any value
Expected results
getOptions returns the 3 different options like getOptionsMap does (without the keys)
Reproduced in
7.1.x (c2f3fa7c9792fccae210b9cf7966277bd0b302cf)
master (0a9d8a4cef3087e830a086d8f30176c27981f37b)
Note
Definition of the object:
https://docs.liferay.com/portal/7.1-latest/javadocs/portal-kernel/com/liferay/portal/kernel/templateparser/TemplateNode.html
* Please see Zendesk Support tab for further comments and attachments.
- causes
-
LPS-120559 getOptions returns the selected and available values for Select fields which allows multiple values
- Closed