Problem/Motivation
Getting this error when trying to hook up on an existing site:
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "crm.user". Did you mean one of these: "crm.user_contact_mapping", "crm.user_field_mapping", "crm.user_contact_field_values_storage", "crm.user_contact_display_sync", "crm.user_create", "crm.user_contact_mapping_settings_config"? in Drupal\Component\DependencyInjection\Container->get() (line 157 of core/lib/Drupal/Component/DependencyInjection/Container.php).
Drupal::service('crm.user') (Line: 365)
Drupal\crm\Hook\UserHooks::userFormEnsureContactSubmit(Array, Object) (Line: 108)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 45)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 615)
Drupal\Core\Form\FormBuilder->processForm('user_form', Array, Object) (Line: 347)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)Steps to reproduce
Enable CRM on an existing site, along with the crm_migration_node site.
Set the CRM options, Fire event on user insert, Lookup Contact, and Create Contact.
Set "Show mapped fields on user forms", and select several fields to map.
Edit an existing user and save -- get this error.
Proposed resolution
It looks like a service dependency that does not exist - got renamed?
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork crm-3585086
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 #2
bluegeek9 commentedComment #5
bluegeek9 commentedComment #7
freelockThanks for the quick fix!