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
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | Screenshot from 2023-10-20 11-04-12.png | 656.07 KB | joey-santiago |
| #15 | Screenshot from 2023-10-20 11-01-20.png | 671.25 KB | joey-santiago |
Issue fork drupal-3365239
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:
- 3365239-status-message-confirming
changes, plain diff MR !4153
Comments
Comment #2
chris matthews commentedComment #3
chris matthews commentedApplies to Vocabularies as well. Updated IS.
Comment #4
chris matthews commentedComment #5
chris matthews commentedComment #6
bcgreen commentedI'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
Comment #8
kevinquillen commented+1 for UX. I was confused when I just encountered this.
Comment #10
ksere commentedSimply rebased the branch @bcgreen created for now.
Comment #11
ksere commentedGot 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
Profile Types
Block Types
Comment Types
Content Types (Unchanged)
Media Types
Vocabularies
This solution should work for any and all fieldable entities. (e.g. Commerce, custom entities, etc).
Comment #12
ksere commentedComment #13
michaellenahan commentedWe, 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.
Comment #14
onfire84 commentedI will review this during the contribution session at DrupalCon Lille today.
Comment #15
joey-santiago commentedConfirm this is now working!
Comment #16
joey-santiago commentedComment #17
mysdiir commentedWe are get mentored by Yepa in DrupalCon Lille for the first time contribution workshop :)
Comment #21
lauriiiCommitted 328648c and pushed to 11.x. Also cherry-picked to 10.2.x. Thanks!