Deleting a individual contact gives: The contact might be the Membership Organization of a Membership Type when the contact is not an organisation
Overview
Attempting to delete a contact gives this message: 'The contact might be the Membership Organization of a Membership Type...' when the contact is not an organisation. See also: Attempting to delete a contact gives 'The contact might be the Membership Organization of a Membership Type.'
Reproduction steps
- Find the contact you want to delete who has a CRM login.
- Attempt to delete them.
- Get the message: 'The contact might be the Membership Organization of a Membership Type...'
Current behaviour
You get the message above.
Expected behaviour
You get this message: 'The contact has a CRM account. Delete this first'.
Environment information
- Browser: MS Edge but probably not relevant
- CiviCRM: 5.72.1
- PHP: 8.3 but probably not relevant.
- CMS: Drupal 10.2.5 but probably not relevant.
- Database: MySQL 8.1.x but probably not relevant.
- Web Server: IIS 10 but probably not relevant.
Comments
I think <Drupal root>/vendor/civicrm/civicrm-core/CRM/Contact/Form/Task/Delete.php
could be coded to solve this and I am thinking of raising a PR to achieve this.