# Bug: Company Field Empty and Uneditable in Contact Records After Import

**URL:** <https://forum.mautic.org/t/bug-company-field-empty-and-uneditable-in-contact-records-after-import/36771>\
**Category:** Mautic 6 Install/Upgrade Support\
**Created:** [October 24, 2025, 2:57pm UTC](https://forum.mautic.org/t/bug-company-field-empty-and-uneditable-in-contact-records-after-import/36771 "2025-10-24T14:57:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrew\_c3](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrew_c3/32/13547_2.png) [@andrew\_c3](https://forum.mautic.org/u/andrew_c3)\
**Post date:** [October 24, 2025, 2:57pm UTC](https://forum.mautic.org/t/bug-company-field-empty-and-uneditable-in-contact-records-after-import/36771/1 "2025-10-24T14:57:30Z")

</div>

Description:  
After importing companies and contacts into the production system, many contacts show an empty company field, and the field cannot be edited. The issue does not occur in the test environment.

Steps to Reproduce:

1. Import companies and contacts into a test instance (small dataset).

2. Verify that contact company fields and company contact counts are correct.

3. Import the same dataset into the production instance (large dataset).

4. Observe that:

**Expected Behavior:**

- Contact company fields should correctly display the associated company.

- The company field should be editable.

**Actual Behavior:**

- Contact company field is empty or uneditable in production.

- Company count is zero in many cases.

**Environment:**

- Mautic version: 6.0.3

- PHP Same for test and production

- MariaDB Same for test and production

- Test system: small dataset

- Production system: large dataset

**Notes:**

- Database records appear correct.

- The issue may be related to editing a contact custom field.

> [@Bug: Editing a Contact Custom Field Removes Associated Company](https://forum.mautic.org/t/bug-editing-a-contact-custom-field-removes-associated-company/36764):
>
> Mautic Version: 6.0.3 Summary When editing a contact in the production instance and adding or updating a value in a custom field, the associated Company value is lost after clicking Save and Close. The test instance is used only for verifying CSV imports, and those imports work correctly - contacts are properly linked to their companies. The issue only occurs when editing contacts in production. Steps to Reproduce 1. Import Setup (works fine on both instances): Import a Company CSV. Impo…

Thanks

---

<div class="post-metadata">

**Author:** ![andrew\_c3](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrew_c3/32/13547_2.png) [@andrew\_c3](https://forum.mautic.org/u/andrew_c3)\
**Post date:** [October 27, 2025, 1:16pm UTC](https://forum.mautic.org/t/bug-company-field-empty-and-uneditable-in-contact-records-after-import/36771/2 "2025-10-27T13:16:55Z")

</div>

Mautic Import Issue – Partial Company-Contact Link Failure

I’ve been importing companies and contacts in batches of around 50 using the browser import feature without any noticing any issues.

However, when importing a smaller batch (10 companies and 10 contacts), I encountered a problem:  
\* The import worked successfully on a test instance.  
\* The same import failed on the production instance.

Details:

| Companies | Contacts | Result |  
| --------------——| --------—— | ------------------------------ --------———|  
| 10 | 10 | 7 imported correctly, 3 failed |

For 3 out of 10 companies, the related contacts showed zero linked companies.

I found that these missing relationships corresponded to 3 missing rows in the `companies_leads` table.

No errors reported in the logs.

After manually adding the missing rows to the database, the company contact totals became correct, and the links started working.

However, the company name field for those affected contacts remains blank and are uneditable—still investigating the cause.

Conclusion:

The import feature in Mautic 6.0.3 is not fully reliable, particularly for company-contact relationships duringbrowser batch imports. I would kindly ask the the developers to investigate further.

Thanks.

---

<div class="post-metadata">

**Author:** ![andrew\_c3](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrew_c3/32/13547_2.png) [@andrew\_c3](https://forum.mautic.org/u/andrew_c3)\
**Post date:** [October 27, 2025, 1:54pm UTC](https://forum.mautic.org/t/bug-company-field-empty-and-uneditable-in-contact-records-after-import/36771/3 "2025-10-27T13:54:51Z")

</div>

Mautic Import Issue – Uneditable Company Name

For the three failed imports as defined above if you edit the contact you cant delete the assigned company because its already blank and if you try and assign the same company this time it is missing “\<small"\>” from the correct company name in the company list. If you save it, it is always blank when reopened.

If you pull down the company list under normal operation then they always have “\<small"\>” in the company name. The failed one dont on my production instance how the test instance is correct.

Does anyone know how to resolve this problem ?

Thanks.

---

<div class="post-metadata">

**Author:** ![andrew\_c3](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrew_c3/32/13547_2.png) [@andrew\_c3](https://forum.mautic.org/u/andrew_c3)\
**Post date:** [October 28, 2025, 1:02pm UTC](https://forum.mautic.org/t/bug-company-field-empty-and-uneditable-in-contact-records-after-import/36771/4 "2025-10-28T13:02:22Z")

</div>

Hello,

Ive done some more testing and I have found the root problem.

The missing company field is not related to importing or adding a custom field entry.

The root problem is with Mautic 6.0.3 which I’m running on my production instance.

If you edit a contact that has an assigned company and make no changes and save and exit then the company is removed from the contact. And the row is being deleted from `companies_leads`. That’s why you cannot add a company because when you save and exit it is lost again.  
That is also why the company contact count is being zero’d.

However my test instance is actually M 6.0.2 and that does not suffer the same problem. You can open a contact with an assigned company, make no changes and save and exit. The company is not removed on a save and exit.

Does this problem still occur on Mautic 6.0.4 onwards ? Would anyone running M6.0.4 or later please confirm if you are experiencing the same problem or has it been fixed already ?

Thanks.

---

<div class="post-metadata">

**Author:** ![rcarabelli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rcarabelli/32/6807_2.png) [@rcarabelli](https://forum.mautic.org/u/rcarabelli)\
**Post date:** [October 28, 2025, 1:22pm UTC](https://forum.mautic.org/t/bug-company-field-empty-and-uneditable-in-contact-records-after-import/36771/5 "2025-10-28T13:22:39Z")

</div>

I am on Mautic 6.0.5 or .0.6 in most of my instances and don’t find that bug

---

<div class="post-metadata">

**Author:** ![andrew\_c3](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrew_c3/32/13547_2.png) [@andrew\_c3](https://forum.mautic.org/u/andrew_c3)\
**Post date:** [October 28, 2025, 1:35pm UTC](https://forum.mautic.org/t/bug-company-field-empty-and-uneditable-in-contact-records-after-import/36771/6 "2025-10-28T13:35:01Z")

</div>

Hello **[rcarabelli](https://forum.mautic.org/u/rcarabelli),**

Thanks for the quick response.

So you can edit a contact that has an assigned company, make no changes and click save and exit and the company is not lost or row deleted from `companies_leads` ?

Did you install M6.0.5 and M6.0.6 directly or did you install interim upgrades ?

I can’t seem to find anything in the version code change logs that comes anything close to this problem on M6.0.3. What version of PHP and Mariadb are you running if you dont mind me asking ?

Thanks.

---

<div class="post-metadata">

**Author:** ![andrew\_c3](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrew_c3/32/13547_2.png) [@andrew\_c3](https://forum.mautic.org/u/andrew_c3)\
**Post date:** [October 28, 2025, 3:12pm UTC](https://forum.mautic.org/t/bug-company-field-empty-and-uneditable-in-contact-records-after-import/36771/8 "2025-10-28T15:12:56Z")

</div>

Hello,

On my production instance (M6.0.3) if I create a new contact and then try to select a pre-existing company I get list of companies with tag “small” before the city and after the country.

However the list does not include all the companies in the database. It stops way short.

If I type the first few letters of the company I get some company names without “small” wrapping city and country. If I select one of those they are not saved when I click save and edit. Only companies with the “small” tags can be saved in the company field.

And looking at the database I cant see the “small” tag anywhere in the company table?

Therefore Mautic must be loading and building the company list but it does not build and display all companies in the database but only a subset. How do you select one that is not in the list ? And if an import adds more companies that do not get a “small” tag they are not viable in the company field and hence the company contact count is zero

My company not being wrapped with “small” is the root problem.

Does anyone know why this is happening on M6.0.3 ?

Thanks

---

<div class="post-metadata">

**Author:** ![andrew\_c3](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrew_c3/32/13547_2.png) [@andrew\_c3](https://forum.mautic.org/u/andrew_c3)\
**Post date:** [October 28, 2025, 4:28pm UTC](https://forum.mautic.org/t/bug-company-field-empty-and-uneditable-in-contact-records-after-import/36771/9 "2025-10-28T16:28:36Z")

</div>

Hello,

I have patched my production instance of M6.0.3 with the following M6.0.4 patch:

> <https://github.com/mautic/mautic/pull/15232>
>
> | Q | A
> | --------------------------------…------ | ---
> | Bug fix? (use the a.b branch) | ✔️ 
> | New feature/enhancement? (use the a.x branch) | ❌
> | Deprecations? | ❌
> | BC breaks? (use the c.x branch) | ❌
> | Automated tests included? | ✔️ 
> | Related user documentation PR URL | mautic/user-documentation#... 
> | Related developer documentation PR URL | mautic/developer-documentation-new#... 
> | Issue(s) addressed | Fixes #15071
> 
> 
> 
> \## Description
> 
> 
> 
> 
> 
> 
> 
> 
> \---
> \### 📋 Steps to test this PR:
> 
> 
> 1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs \[here\](https://contribute.mautic.org/contributing-to-mautic/tester))
> 2. Add over 100 companies or use this import file: \[generated-contacts.csv\](https://github.com/user-attachments/files/21163393/generated-contacts.csv)
> 3. Create a contact and assign it to a company that does not appear in the initial company selection list (e.g., Visionary Corp).
> 4. Edit the contact and confirm that the assigned company is displayed.
> 5. Save the contact and verify that the company remains associated and visible.

I can now add any company stored in the database to a contact and it is preserved when you save and exit from the contact record. The company contact total is as expected.

However the presented company list is still only a subset of the complete list of companies again wrapped by the “small” tag. By typing the company name you want you can add it to the company field and it is preserved on save and exit. These are not wrapped by the “small” tag.

I don’t understand why some companies are wrapped in the “small” tag and others are not. If a developer knows the answer I would like to understand the logic of having two types of company definition in the list.

The next time I import some companies and contacts I will confirm this patch works as expected and I will report the results back here soon.

Thanks.
