Problem/Motivation
When enabling the CRM Group relation plugin for contacts (for example group_crm_contact:person), exported config for the resulting relationship type contains an invalid dependency:
dependencies: config: - crm_contact.type.person
But the actual config entity name is:
crm.crm_contact_type.person
This causes config import failures such as:
Configuration group.relationship_type.account-group_crm_contact-person depends on the crm_contact.type.person configuration that will not exist after import.
The problem appears to come from Drupal\crm\Plugin\Group\Relation\GroupContact::calculateDependencies(), which currently appends:
$dependencies['config'][] = 'crm_contact.type.' . $this->getRelationType()->getEntityBundle();
But the CRM contact type config prefix is crm.crm_contact_type.
Steps to reproduce
- Install the CRM module.
- Enable the Group relation plugin for a CRM person contact on a group type.
- Export config.
- Attempt to import that config again.
Proposed resolution
Change the dependency generation to use the correct config prefix:
$dependencies['config'][] = 'crm.crm_contact_type.' . $this->getRelationType()->getEntityBundle();
Remaining tasks
- Update
GroupContact::calculateDependencies(). - Verify exported relationship type config uses
crm.crm_contact_type.person. - Confirm config export/import succeeds after the change.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue summary generated with AI assistance.
Issue fork crm-3601135
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
Comment #3
freelockNeeds review.
Comment #6
bluegeek9 commented