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

Command icon 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

freelock created an issue. See original summary.

bluegeek9’s picture

Assigned: Unassigned » bluegeek9

  • bluegeek9 committed d88771c2 on 1.0.x
    feat: #3585086 ServiceNotFoundException: You have requested a non-...
bluegeek9’s picture

Assigned: bluegeek9 » Unassigned
Status: Active » Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support makes this project sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:
  • Triage issues and adding more context to existing issues.
  • Flagging CRM as a favorite on the project page to help others discover it and show your support.
  • Review the Developer Docs for accuracy and clarity.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

freelock’s picture

Thanks for the quick fix!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.