Skip to content

Custom customer attributes don't show in admin unless they're configured to show on frontend #14456

@erikhansen

Description

@erikhansen

Custom customer attributes don't show in admin unless they're configured to show on either "Customer Registration" or "Customer Account Edit" forms. This is incorrect, as a custom customer attribute should always show in the admin customer create/edit forms.

Preconditions

  1. Install Magento 2.2.3 Commerce with sample data

Steps to reproduce

  1. Create a customer attribute using settings like this:
    magento admin-7yrfv
    1. Note: I'm giving steps to reproduce this on Commerce, but this issue also exists for customer attributes created via upgrade scripts on Open Source, thus why I'm creating this issue on Github rather than submitting a support ticket.
  2. Go to create a new customer: CUSTOMERS > All Customers > Add New Customer

Expected result

  1. The "Test Attribute" attribute should show:
    magento admin-h2fjc

Actual result

  1. The "Test Attribute" attribute does not show:
    magento admin-tkue6
    1. If you edit the attribute again and select either "Customer Account Edit" or "Customer Registration" from the list, you'll see the attribute.
      magento admin showmecables com-cmv60

This is a regression in Magento 2.2.x. It's due to this code checking for customer_account_edit and customer_account_create.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CustomerIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions