Problem/Motivation

There are a bunch of fields that are required for the system to function. Let's call them "critical fields".

Steps to reproduce

One example:

  1. Delete the "Preferred name" field from the Person Contact Type
  2. Submit a Person add/edit form

Expected: Form submits successfully
Actual: White screen error

Proposed resolution

Allow deletion of critical fields via the UI

Remaining tasks

  • Identify critical fields
  • Implement

User interface changes

API changes

Data model changes

Issue fork crm-3541478

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

jdleonard created an issue. See original summary.

bluegeek9’s picture

I think we should handle the removal of these fields elegantly. I think site builders should be granted as much freedom as possible.

The project really only needs the base field name to work. Full Name, Aliases, and Preferred name are only used for the User's Display name, and the entity name field.

If we set `persist_with_no_fields: true` site builders can delete the field and still re-add it later.

jdleonard’s picture

I agree.

I'm new to `persist_with_no_fields`. Would it cause artifacts to remain after uninstalling CRM?

bluegeek9’s picture

It means the field is available to add to a contact even if it is deleted from the person bundle.

bluegeek9’s picture

Title: Prevent deletion/modification of necessary fields » Optional: Name Fields
Issue summary: View changes

bluegeek9’s picture

Status: Active » Needs review

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

bluegeek9’s picture

Status: Needs review » 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.

Status: Fixed » Closed (fixed)

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