Cannot create custom fields

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.

Hi, how many contacts do you have?

Hi @joeyk ,

Currently I have 50 contacts.

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

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

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.

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

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 … this allows faster processing.

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

2 Likes

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

Hi @escopecz , Thanks for Pointing this out.

-ison

Hi @dirk_s ,

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

-ison

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