fusionauth-issues
fusionauth-issues copied to clipboard
Preview Functionality on Theme Pages for Account Edit Fail
Preview Functionality on Theme Pages for Account Edit Fail
Description
When previewing account edit, sometimes a freemarker exception can be thrown.
Affects versions
Lastest
Steps to reproduce
Steps to reproduce the behavior: Try and preview the Account edit page. Sometimes the preview will fail.
This was the specific code which caused the failure
[#list fields as fieldKey, fieldValues]
[#-- Section labels --]
[#assign sectionNumber = fieldKey + 1/]
[#assign sectionLabel = generateSectionLabel(sectionNumber, tenantId) /]
[#if sectionLabel?has_content]
<legend> ${sectionLabel} </legend>
[/#if]
[#list fieldValues as field]
[#if field.key == "user.password"]
[@helpers.passwordField field/]
[#else]
[@helpers.customField field=field key=field.key autofocus=false placeholder=field.key label=theme.optionalMessage(field.key) leftAddon="false"/]
[#if field.confirm]
[@helpers.customField field "confirm.${field.key}" false "[confirm]${field.key}" /]
[/#if]
[/#if]
[/#list]
[/#list]
Expected behavior
Account Edit should be able to be previewed.
Screenshots
If applicable, add screenshots to help explain your problem.
Platform
(Please complete the following information)
Community guidelines
All issues filed in this repository must abide by the FusionAuth community guidelines.
Additional context
Internal
https://inversoft.slack.com/archives/C02PT1ZN13R/p1648236200818219
Internal notes:
We need to ensure we build the correct collection type for fields
when previewing this page regardless of the application registration type.
Internal:
- https://github.com/FusionAuth/fusionauth-app/pull/212