[4.x] Fix user wizard error when user blueprint has bard field #9416
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes a user wizard error when the user blueprint has a bard field, which was accidentally introduced by #9003, and reported by @edalzell.
The issue is that the PR introduced a
toPublishArray()
call on a set ofpreProcess()
'd fields (in order to provide the new additional fields to the user wizard). The additionalfields
passed to the user wizard don't need to bepreProcessed()
though, since we passvalues
separately, so this fix uses a freshFields
instance off the blueprint.There's no tests for this fix, because it's a bit of a bandaid fix for a slightly deeper issue. Bard fields
preProcess()
empty values to a string JSON value of'[]'
, which then errors you try totoPublishArray()
. We're unsure what the actual fix should be. We've been preprocessing bard fields to JSON since 3.0-beta, but what was the reason for that?