# Cannot create custom fields

**URL:** <https://forum.mautic.org/t/cannot-create-custom-fields/28061>\
**Category:** Product Support\
**Created:** [May 18, 2023, 6:54am UTC](https://forum.mautic.org/t/cannot-create-custom-fields/28061 "2023-05-18T06:54:29Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ison](https://avatars.discourse-cdn.com/v4/letter/i/eb9ed0/32.png) [@ison](https://forum.mautic.org/u/ison)\
**Post date:** [May 18, 2023, 6:54am UTC](https://forum.mautic.org/t/cannot-create-custom-fields/28061/1 "2023-05-18T06:54:29Z")

</div>

**Your software**  
My Mautic version is: 4.4.8  
My PHP version is: 8.0.28  
My Database type and version is: mysql Ver 15.1 Distrib 10.5.13-MariaDB

**Your problem**  
My problem is: I created a custom fields but it says “Your custom field is being created, we will notify you when complete”. I waited for a couple of minutes and retry but still the same result.

These errors are showing in the log:  
[2023-05-18 14:30:46] mautic.CRITICAL: Uncaught PHP Exception Mautic\LeadBundle\Field\Exception\AbortColumnCreateException: “Column change will be processed in background job” at /var/www/html/app/bundles/LeadBundle/Field/Dispatcher/FieldColumnDispatcher.php line 43 {“exception”:“[object] (Mautic\LeadBundle\Field\Exception\AbortColumnCreateException(code: 0): Column change will be processed in background job at /var/www/html/app/bundles/LeadBundle/Field/Dispatcher/FieldColumnDispatcher.php:43)”} {“hostname”:“mautic.metro.com.ph”,“pid”:23940}

Steps I have tried to fix the problem: None for now.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [May 18, 2023, 8:32am UTC](https://forum.mautic.org/t/cannot-create-custom-fields/28061/2 "2023-05-18T08:32:38Z")

</div>

Hi, how many contacts do you have?

---

<div class="post-metadata">

**Author:** ![ison](https://avatars.discourse-cdn.com/v4/letter/i/eb9ed0/32.png) [@ison](https://forum.mautic.org/u/ison)\
**Post date:** [May 18, 2023, 11:10pm UTC](https://forum.mautic.org/t/cannot-create-custom-fields/28061/3 "2023-05-18T23:10:48Z")

</div>

Hi @joeyk ,

Currently I have 50 contacts.

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [May 19, 2023, 9:37am UTC](https://forum.mautic.org/t/cannot-create-custom-fields/28061/4 "2023-05-19T09:37:14Z")

</div>

> [@ison](#):
>
> Column change will be processed in background job

Interesting… what background job is it referring to - Mautic or Database? If Mautic, I wonder which task would need to be called via cronjob.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [May 20, 2023, 5:47am UTC](https://forum.mautic.org/t/cannot-create-custom-fields/28061/5 "2023-05-20T05:47:54Z")

</div>

I checked the translations, and I couldn’t find any related output.  
Similar text is visible, when you import…

---

<div class="post-metadata">

**Author:** ![IonutOjicaDe](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ionutojicade/32/7383_2.png) [@IonutOjicaDe](https://forum.mautic.org/u/IonutOjicaDe)\
**Post date:** [May 20, 2023, 7:23am UTC](https://forum.mautic.org/t/cannot-create-custom-fields/28061/6 "2023-05-20T07:23:23Z")

</div>

Can it be related to PHP 8 ? Mautic 4 does not support PHP 8.  
In Mautic 4.4.8 I created a couple of days ago a Custom Field, without any issue.

---

<div class="post-metadata">

**Author:** ![ison](https://avatars.discourse-cdn.com/v4/letter/i/eb9ed0/32.png) [@ison](https://forum.mautic.org/u/ison)\
**Post date:** [May 22, 2023, 12:07am UTC](https://forum.mautic.org/t/cannot-create-custom-fields/28061/7 "2023-05-22T00:07:23Z")

</div>

Hello @dirk_s, thanks for your reply. To be honest I don’t know which background job it is referring to. this is the cron job that I use:  
0,10,20,30,40,50 \*/1 \* \* \* /usr/bin/php /var/www/html/bin/console mautic:segments:update --env=prod \> /dev/null 2\>&1  
2,12,22,32,42,52 \*/1 \* \* \* /usr/bin/php /var/www/html/bin/console mautic:campaigns:update --env=prod \> /dev/null 2\>&1  
4,14,24,34,44,54 \*/1 \* \* \* /usr/bin/php /var/www/html/bin/console mautic:campaigns:trigger --env=prod \> /dev/null 2\>&1  
6,16,26,36,46,56 \*/1 \* \* \* /usr/bin/php /var/www/html/bin/console mautic:broadcasts:send --env=prod \> /dev/null 2\>&1  
8,18,28,38,48,58 \*/1 \* \* \* /usr/bin/php /var/www/html/bin/console mautic:emails:send --env=prod \> /dev/null 2\>&1

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/1/1edc8f52aac7589b7dae1ad27c1e00c5826e165e.png)

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [May 22, 2023, 6:14am UTC](https://forum.mautic.org/t/cannot-create-custom-fields/28061/8 "2023-05-22T06:14:24Z")

</div>

I doubt, that any of those cron jobs will work on the database structure… I’d suggest to open an issue in github for that and giving as much related information as possible. Usually adding a custom field is no issue even in larger installations. Is you server environment well sized? At least 500MB of RAM, better more?

What happens if you try to add another custom field?

By the way - little improvement: I would suggest to setup one cron job that starts the commands in squence: [How to setup Mautic cron jobs](https://twentyzen.com/en/think/faq-items/start-mautic-cron-jobs-in-sequence/) … this allows faster processing.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [May 22, 2023, 7:35am UTC](https://forum.mautic.org/t/cannot-create-custom-fields/28061/9 "2023-05-22T07:35:53Z")

</div>

You’ve probably configured to create the custom fields in a background job. It’s needed for bigger database sizes because it can take a long time.

See [Manage custom fields | Mautic](https://docs.mautic.org/en/contacts/manage-custom-fields#creating-custom-fields-via-a-command)

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [May 22, 2023, 8:13am UTC](https://forum.mautic.org/t/cannot-create-custom-fields/28061/10 "2023-05-22T08:13:03Z")

</div>

@escopecz thanks for pointing this out! This is a great little trick as often on big databases we have timeouts when creating new fields.

---

<div class="post-metadata">

**Author:** ![ison](https://avatars.discourse-cdn.com/v4/letter/i/eb9ed0/32.png) [@ison](https://forum.mautic.org/u/ison)\
**Post date:** [May 22, 2023, 8:20am UTC](https://forum.mautic.org/t/cannot-create-custom-fields/28061/11 "2023-05-22T08:20:22Z")

</div>

Hi @escopecz , Thanks for Pointing this out.

-ison

---

<div class="post-metadata">

**Author:** ![ison](https://avatars.discourse-cdn.com/v4/letter/i/eb9ed0/32.png) [@ison](https://forum.mautic.org/u/ison)\
**Post date:** [May 22, 2023, 8:28am UTC](https://forum.mautic.org/t/cannot-create-custom-fields/28061/12 "2023-05-22T08:28:45Z")

</div>

Hi @dirk_s ,

Thanks for this suggestion. I will put this in mind when deploying into production.

-ison

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [May 23, 2023, 8:29pm UTC](https://forum.mautic.org/t/cannot-create-custom-fields/28061/13 "2023-05-23T20:29:15Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
