Phone number in profile content type displayed as text and duplicate

Created on 13 December 2024, 8 days ago

Problem/Motivation

In the profile content type, there is a field_person__phone_number. It seems like there are two issues with this field.

1. Unlike the field_person__email field, which is displayed as a mailto: link, the phone number field is not displayed as a tel: link. If that is not intentional, I think we should display the phone number as a link too.

2. The phone number field is displayed two times in the default view mode, see core.entity_view_display.node.person.default.yml:

          ef1343b2-5ab6-419d-8ab9-6800e806caa3:
            uuid: ef1343b2-5ab6-419d-8ab9-6800e806caa3
            region: content
            configuration:
              id: 'field_block:node:person:field_person__phone_number'
              label_display: '0'
              context_mapping:
                entity: layout_builder.entity
              formatter:
                type: string
                label: inline
                settings:
                  link_to_entity: false
                third_party_settings: {  }
            weight: 5
            additional: {  }
          407be3c7-f9db-40fc-a38a-142a9621ad6a:
            uuid: 407be3c7-f9db-40fc-a38a-142a9621ad6a
            region: content
            configuration:
              id: 'field_block:node:person:field_person__phone_number'
              label_display: '0'
              context_mapping:
                entity: layout_builder.entity
              formatter:
                type: basic_string
                label: above
                settings: {  }
                third_party_settings: {  }
            weight: 7
            additional: {  }

Steps to reproduce

Install Drupal CMS with person profiles from the installer step 1
Create a new person profile with the phone number field filled
Go to the entity detail and observe that mail is displayed as link, phone number is not displayed as link and phone number is displayed multiple times.

Proposed resolution

Display phone number as tel: link
Remove the duplicate field display from the default view mode

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Component

General

Created by

πŸ‡ΈπŸ‡°Slovakia poker10

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

Comments & Activities

Production build 0.71.5 2024