# Error when deleting a custom field

**URL:** <https://forum.mautic.org/t/error-when-deleting-a-custom-field/17514>\
**Category:** Product Support\
**Created:** [December 22, 2020, 6:19am UTC](https://forum.mautic.org/t/error-when-deleting-a-custom-field/17514 "2020-12-22T06:19:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![namratasaun](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/namratasaun/32/2801_2.png) [@namratasaun](https://forum.mautic.org/u/namratasaun)\
**Post date:** [December 22, 2020, 6:19am UTC](https://forum.mautic.org/t/error-when-deleting-a-custom-field/17514/1 "2020-12-22T06:19:56Z")

</div>

**Your software**  
My Mautic version is: 3.2  
My PHP version is: 7.4

**Your problem**  
My problem is: when I make a custom field and add it to column filtering, and then delete that custom field. I am unable to open contacts again as api hit givs server error.

These errors are showing in the log:

> mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\InvalidFieldNameException: “An exception occurred while executing ‘SELECT l.\* FROM leads l LEFT JOIN users u ON u.id = l.owner\_id WHERE l.date\_identified IS NOT NULL ORDER BY l.created\_at DESC LIMIT 30’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l.created\_at’ in ‘order clause’” at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 60 {“exception”:“[object] (Doctrine\DBAL\Exception\InvalidFieldNameException(code: 0): An exception occurred while executing ‘SELECT l.\* FROM leads l LEFT JOIN users u ON u.id = l.owner\_id WHERE l.date\_identified IS NOT NULL ORDER BY l.created\_at DESC LIMIT 30’:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l.created\_at’ in ‘order clause’ at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:60, Doctrine\DBAL\Driver\PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l.created\_at’ in ‘order clause’ at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:80, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘l.created\_at’ in ‘order clause’ at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:75)”}

Steps I have tried to fix the problem:  
I fixed the problem by again creating a custom field with same name, but I want to delete it. But then contacts won’t work.  
I think this is a bug
