Problem/Motivation

Steps to reproduce

Add a 'Test' field to the user profile at /admin/config/people/accounts/fields
Delete the 'Test' field
Actual status message: The field Test has been deleted from the User content type.
Expected status message: The field Test has been deleted from the User profile.


Add a 'Test' field to the Basic block block type at /admin/structure/block/block-content/manage/basic/fields
Delete the 'Test' field
Actual status message: The field Test has been deleted from the Basic block content type.
Expected status message: The field Test has been deleted from the Basic block block type.


Add a 'Test' field to the Default comments comment type at /admin/structure/comment/manage/comment/fields
Delete the 'Test' field
Actual Status message: The field Test has been deleted from the Default comments content type.
Expected status message: The field Test has been deleted from the Default comments comment type.


Add a 'Test' field to the Article content type at /admin/structure/types/manage/article/fields
Delete the 'Test' field
Actual Status message: The field Test has been deleted from the Article content type.
This makes sense, because the field in this instance is being delete from a 'content type'


Add a 'Test' field to the 'Audio' media type at /admin/structure/media/manage/audio/fields
Delete the 'Test' field
Actual status message: The field Test has been deleted from the Audio content type.
Expected status message: The field Test has been deleted from the Audio media type.


Add a 'Test' field to the 'Tags' vocabulary at /admin/structure/taxonomy/manage/tags/overview/fields
Delete the 'Test' field
Actual status message: The field Test has been deleted from the Tags content type.
Expected status message: The field Test has been deleted from the Tags vocabulary.


Proposed resolution

  • When deleting a field from the User profile, the status message should say the field was deleted from the 'profile', not 'content type'
  • When deleting a field from a Custom block type, the status message should say the field was deleted from the 'block type', not 'content type'
  • When deleting a field from a Comment type, the status message should say the field was deleted from the comment type, not 'content type'
  • When deleting a field from a Media type, the status message should say the field was deleted from the media type, not 'content type'
  • When deleting a field from a Vocabulary, the status message should say the field was deleted from the vocabulary, not 'content type'

Remaining tasks

Discuss
Agree
Patch
Review

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3365239

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Chris Matthews created an issue. See original summary.

chris matthews’s picture

Title: Status message to confirm field deletion incorrectly references 'content type' » Status message confirming field deletion incorrectly references 'content type'
chris matthews’s picture

Issue summary: View changes

Applies to Vocabularies as well. Updated IS.

chris matthews’s picture

Issue summary: View changes
chris matthews’s picture

Issue summary: View changes
bcgreen’s picture

I've done a bit of research on this, and haven't found a good way to grab the 'bundle type' label. By simply deleting the words 'content type' from the status message, however, you end up with messages like these:

The field Test has been deleted from User.

The field Test has been deleted from Basic block.

...which may be acceptable (and a little cleaner)?

--Bryan

kevinquillen’s picture

+1 for UX. I was confused when I just encountered this.

ksere made their first commit to this issue’s fork.

ksere’s picture

Simply rebased the branch @bcgreen created for now.

ksere’s picture

Got a working solution that fits the proposed resolution.

Note that Users and Profiles are two distinct entity types.

For Profile entity types, the terminology profile type is used as that is the name of the bundle.

For User entity types, there is no bundle. I've opted to default to entity type for this case. It's generic and is still appropriate Drupal terminology.

New Status Messages

User

The field Test has been deleted from the User entity type

Profile Types

The field Test has been deleted from the Main profile type.

Block Types

The field Test has been deleted from the Basic block type.

Comment Types

The field Test has been deleted from the Default comments comment type.

Content Types (Unchanged)

The field Test has been deleted from the Article content type.

Media Types

The field Test has been deleted from the Audio media type.

Vocabularies

The field Test has been deleted from the Tags taxonomy vocabulary.

This solution should work for any and all fieldable entities. (e.g. Commerce, custom entities, etc).

ksere’s picture

Status: Active » Needs review
michaellenahan’s picture

Issue tags: +DrupalCon Lille 2023

We, the mentoring team, are triaging issues for first time contributors at DrupalCon Lille and I think this is a good issue for the contribution day.
We are reserving this issue so please don't work on this issue if you are not at DrupalCon Lille. You can continue the work when the event is over.

onfire84’s picture

I will review this during the contribution session at DrupalCon Lille today.

joey-santiago’s picture

Confirm this is now working!

joey-santiago’s picture

Status: Needs review » Reviewed & tested by the community
mysdiir’s picture

We are get mentored by Yepa in DrupalCon Lille for the first time contribution workshop :)

lauriii made their first commit to this issue’s fork.

  • lauriii committed 328648c5 on 11.x
    Issue #3365239 by ksere, bcgreen, lauriii, joey-santiago, Chris Matthews...

  • lauriii committed 27eae12a on 10.2.x
    Issue #3365239 by ksere, bcgreen, lauriii, joey-santiago, Chris Matthews...
lauriii’s picture

Version: 11.x-dev » 10.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 328648c and pushed to 11.x. Also cherry-picked to 10.2.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.