Can't load content type display edit page with name field enabled

Created on 30 August 2019, over 5 years ago
Updated 15 February 2023, almost 2 years ago

When I have the name field enabled on a display for a content type, I can't get to the UI for managing that display. E.g., on /admin/structure/types/manage/CONTENTTYPE/display/DISPLAYNAME, I get the following error:

The website encountered an unexpected error. Please try again later.
TypeError: Argument 2 passed to Drupal\name\NameGenerator::filterByFieldSettings() must be of the type array, null given, called in modules/contrib/name/src/NameGenerator.php on line 162 in Drupal\name\NameGenerator->filterByFieldSettings() (line 211 of modules/contrib/name/src/NameGenerator.php).

My config for the field is this:

  field_person_name:
    weight: 0
    label: inline
    settings:
      format: default
      markup: none
      output: default
      list_format: ''
      link_target: ''
      preferred_field_reference: ''
      preferred_field_reference_separator: ', '
      alternative_field_reference: ''
      alternative_field_reference_separator: ', '
    third_party_settings: {  }
    type: name_default
    region: content

On a display where the field is disabled, I can load the display edit page, but if I try to enable the field, the AJAX spinner by the "Name Formatter" dropdown just spins, and the field never enables.

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Kasey_MK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States scottsawyer Atlanta

    I just ran into this on a site that another developer installed this patch, which I removed as part of an upgrade. What I did to resolve it was set the registry installed version to 8202 and reran the database update.

    drush ev "\Drupal::service('update.update_hook_registry')->setInstalledVersion('name', 8202);"
    drush updb -y
    

    Then the configs were installed, no more errors.

Production build 0.71.5 2024