Error prevents adding phone number to contact

Created on 14 August 2025, 1 day ago

Problem/Motivation

Can't add phone number to contact.

Steps to reproduce

1. Install CRM
2. Navigate to a contact entity add form (e.g. `/crm/contact/add/person`) or edit form (e.g. `/crm/contact/3/edit`)
3. Click "Add new telephone"
4. Enter a phone number and click "Create telephone"

Expected:
Telephone number created

Actual:
Resulting AJAX request errors and telephone number is not created:

Error: Object of class Drupal\telephone\Plugin\Field\FieldType\TelephoneItem could not be converted to string in Drupal\crm\Entity\ContactDetail\TelephoneContactDetail->label() (line 21 of /var/www/html/src/Entity/ContactDetail/TelephoneContactDetail.php).

TypeError: strlen(): Argument #1 ($string) must be of type string, Drupal\telephone\Plugin\Field\FieldType\TelephoneItem given in strlen() (line 397 of /var/www/html/web/core/lib/Drupal/Component/Utility/Unicode.php)

Proposed resolution

Remaining tasks

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jdleonard Austin, TX, USA

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024