Needs review
Project:
Mass Contact
Version:
8.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Mar 2026 at 00:21 UTC
Updated:
30 Mar 2026 at 05:56 UTC
Jump to comment: Most recent
After uninstalling the Mass Contact module, my status report lists the following error:
Entity/field definitions
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
UserThe user.mass_contact_opt_out field needs to be uninstalled.
Running Drupal 10.6.5.
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
Comment #3
akash_deep commentedWorking on this
Comment #5
akash_deep commentedfixed the two issues in hook_uninstall() - added the missing leading backslash on the Drupal::configFactory() calls and corrected a typo in the docblock. The field should now be properly removed when the module is uninstalled.
Comment #6
akash_deep commentedComment #7
vinodhini.e commentedHi, Tested this module on Drupal 10.5.1.
Reproduced the issue:
Observed error:
Mismatched entity and/or field definitions – The user.mass_contact_opt_out field needs to be uninstalled.
Applied merge request !8.
The issue still persists after applying the patch. The patch in MR !8 does not fully resolve the issue.
The field is still not properly removed during module uninstall.
Comment #8
akash_deep commentedHi @vinodhini.e, thanks for testing that. You were right, the fix wasn't working because mass_contact_opt_out is a base field defined in hook_entity_base_field_info, not a config field. So the configFactory calls had nothing to delete. I've updated the MR to use entityDefinitionUpdateManager instead which is the proper way to remove base fields on uninstall. Could you please give it another test when you have time?
Comment #9
akash_deep commentedComment #10
vinodhini.e commentedHi, @akash_deep,
I followed the below steps:
However, the issue still persists. It still shows the following message on the status report page:
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions:
User: The user.mass_contact_opt_out field needs to be installed.
The patch does not resolve the issue as expected. Thanks.