Skip to content

[5.x]: Enabling "Full Name" in Card Attributes of Users > User Profile Fields triggers "Argument must be of type array, null given" #16358

@redburn

Description

@redburn

What happened?

Description

On a mostly clean, fresh install of Craft CMS, when I go to Settings > User Profile Fields, then under "Card Attributes" I check the box in front of "Full Name", I'm presented with the following error:

craft\base\Element::attributePreviewHtml(): Argument #1 ($attribute) must be of type array, null given, called in /home/dev/crafty/vendor/craftcms/cms/src/helpers/Cp.php on line 2638

Steps to reproduce

  1. Open Crafty admin and click Settings
  2. Click Users
  3. In User Profile Fields, under Card Attributes, click "Full Name"

Expected behavior

The text "Full Name" should appear in the card on the right of the Card Attributes list.

Actual behavior

The above error is given and the card is not updated, even when you toggle other attributes like Email or UID, until Full Name is unchecked.

Craft CMS version

5.5.7

PHP version

8.3.15

Operating system and version

AlmaLinux 9.5

Database type and version

MariaDB 10.5.22

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions