Problem/Motivation

Get error message 'field_mappings' is a required key

Steps to reproduce

When I try to save page 'User Contact Mapping Settings' (/admin/config/crm/user/settings) I get error "Error message 'field_mappings' is a required key."

I get this error when using crm-1.0.0-beta6. If I downgrade to crm-1.0.0-beta5, the error no longer appears.

My site is on Drupal 11.3.5 and php 8.3.30

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork crm-3579879

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

adrianm6254 created an issue. See original summary.

adrianm6254’s picture

Issue summary: View changes

adrianm6254’s picture

As it turns out the original error I received was because the site never had a default language set. I do not understand why my original error was "field_mappings' is a required key" when I would try to save the node. I will say I have learned a lot from this issue tracking it from setting the key mapping to getting my phpcs setup globally on my system, to creating my very first !MR (instead of generating a patch) to working through getting the language finally set on my site, especially since I have just enough php programming knowledge to be dangerous. I will thank the maintainers for their patience during my stumbling and lesson on troubleshooting code.

This issue should be closed.

jdleonard’s picture

Status: Active » Postponed (maintainer needs more info)

@adrianm6254 Glad there were good learning opportunities along the way!

There's still a chance there is a CRM bug here. Can you please provide detailed steps to reproduce the error (e.g. including DDEV steps to set up the hosting environment and Drupal) so we can investigate further?

adrianm6254’s picture

In my isolation steps I did install group and crm on a sandbox and had no issues.

The error happened in DDEV local and on the hosting platform Flexsite. My DDEV settings are the default ddev settings.

It seemed to stem, eventually, to the language setting being unset because the site I was having issues with was an existing site that was originally built back in 2018 before the group module was a stable release. I did discover the language was not set and because of that the fix for the issue was setting the language manually using drush: drush config-set crm.user\_contact\_mapping.settings langcode en -y. I then captured the change in configuration to propagate it to the host.

So possibly the thing to do is have a way to set the language or provide a default if nothing is set in `/admin/config/crm/user/settings`

Will this do or do you need more information?

bsnodgrass’s picture

Status: Postponed (maintainer needs more info) » Active

Talking with @adrianm6254 We talked with maintainers at DrupalCon Chicago. Changing the status to active.

bluegeek9 made their first commit to this issue’s fork.

bluegeek9 changed the visibility of the branch 1.0.x to hidden.

bluegeek9 changed the visibility of the branch 3579879-get-error-message to hidden.

jdleonard’s picture

Status: Active » Postponed (maintainer needs more info)

@adrianm6254, can you please provide step-by-step instructions to reproduce?

bluegeek9’s picture

Status: Postponed (maintainer needs more info) » Active
bluegeek9’s picture

Assigned: Unassigned » bluegeek9

  • bluegeek9 committed a0f7e42a on 1.0.x
    fix: #3579879 Get error message 'field_mappings' is a required key
    
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.

  • 56e2999f committed on 1.0.x
    fix: #3579879 Get error message 'field_mappings' is a required key
    
    By:...

  • 5f9a4a10 committed on 1.0.x
    fix: #3579879 Get error message 'field_mappings' is a required key
    
    By:...

  • 46bc46fd committed on 1.0.x
    fix: #3579879 Get error message 'field_mappings' is a required key
    
    By:...

Status: Fixed » Closed (fixed)

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