Skip to content

[6.x] Fix user wizard breaking when blueprint has conditional fields - #15324

Merged
jasonvarga merged 2 commits into
6.xfrom
user-wizard-initial-values
Sep 1, 2026
Merged

[6.x] Fix user wizard breaking when blueprint has conditional fields#15324
jasonvarga merged 2 commits into
6.xfrom
user-wizard-initial-values

Conversation

@duncanmcclean

Copy link
Copy Markdown
Member

This pull request fixes an issue where adding a field condition to the user blueprint could break the "create user" wizard — clicking Next wouldn't advance, and Vue would log "Unhandled error during execution of component update" and "Cannot destructure property 'type' of 'vnode' as it is null" errors.

This was happening because the create controller passes the pre-processed values under a values key, while the users/Create page expects an initialValues prop. The wizard's publish container ended up running on an empty object, so every field's value resolved to null instead of its pre-processed default. Fieldtypes that expect an array value (like user_roles or entries) then throw while computing their field actions, leaving a half-rendered component that crashes Vue when the step is unmounted — freezing the wizard.

This PR fixes it by passing the values under the initialValues key the page expects, so field defaults reach the wizard and field conditions evaluate against real values.

This PR also provides the wizard's roles, groups and super selections as extra values to the publish container, so conditions referencing them behave the same as on the Edit User page (e.g. a field with "show when roles contains editor" will appear on the first step after assigning the role and navigating back).

Fixes #15316

Caused by #12942

duncanmcclean and others added 2 commits September 1, 2026 09:59
@jasonvarga
jasonvarga merged commit f573475 into 6.x Sep 1, 2026
65 checks passed
@jasonvarga
jasonvarga deleted the user-wizard-initial-values branch September 1, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding condition to User fields can break creating new users

2 participants