Mautic 5.1.0 | Why is Company Name a required field? And why is ttext length so short?

Your software
My Mautic version is: 5.1.10
My PHP version is: 8.2
My Database type and version is: MariaDB 11

Your problem
My problem is:
When attempting to import contacts via CSV there are two issues:

  1. Company Name is a required field, why?
  2. When importing Company Name, the character limit is too short. I am importing a bunch of contacts, none of whom’s Company Name is longer than 30 characters.

These errors are showing in the log:
mautic.CRITICAL: Uncaught PHP Exception Doctrine\ORM\ORMException: "An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'companyname' at row 1" at /var/www/mautic/mautic/app/bundles/LeadBundle/Model/ImportModel.php line 340 {"exception":"[object] (Doctrine\\ORM\\ORMException(code: 0): An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'companyname' at row 1 at /var/www/mautic/mautic/app/bundles/LeadBundle/Model/ImportModel.php:340)"} {"hostname":"ip-172-31-7-135","pid":129912}

Steps I have tried to fix the problem:
I am not sure what to try as the Company Name field is a built in, non editible field which is also a required field when importing.

Hi, I think company name lenght can be set in Custom fields.

image

I have 255, you might be able to resize via Mysql.

Joey

Thanks @joeyk

MariaDB [mautic]> ALTER TABLE companies MODIFY COLUMN companyname VARCHAR(200);
ERROR 1071 (42000): Specified key was too long; max key length is 3072 bytes
MariaDB [mautic]>

Hmmm.

GPT says this about the error:
The error you’re seeing occurs because the companyname column is part of an index, and the combined key length (including this column and possibly others) exceeds the maximum allowed size (3072 bytes) when using utf8mb4.

Does this seem right to you?