fusionauth-issues icon indicating copy to clipboard operation
fusionauth-issues copied to clipboard

Preview Functionality on Theme Pages for Account Edit Fail

Open jobannon opened this issue 2 years ago • 1 comments

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. Screen Shot 2022-03-25 at 2 14 36 PM Screen Shot 2022-03-25 at 2 14 10 PM

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

jobannon avatar Mar 25 '22 19:03 jobannon

Internal notes: We need to ensure we build the correct collection type for fields when previewing this page regardless of the application registration type.

robotdan avatar Mar 25 '22 23:03 robotdan

Internal:

  • https://github.com/FusionAuth/fusionauth-app/pull/212

lyleschemmerling avatar Feb 14 '23 00:02 lyleschemmerling