# Mautic segment creation with filter fails (form creation fails too)

**URL:** <https://forum.mautic.org/t/mautic-segment-creation-with-filter-fails-form-creation-fails-too/34896>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [January 30, 2025, 12:46pm UTC](https://forum.mautic.org/t/mautic-segment-creation-with-filter-fails-form-creation-fails-too/34896 "2025-01-30T12:46:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcdiver](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mcdiver/32/6618_2.png) [@mcdiver](https://forum.mautic.org/u/mcdiver)\
**Post date:** [January 30, 2025, 12:46pm UTC](https://forum.mautic.org/t/mautic-segment-creation-with-filter-fails-form-creation-fails-too/34896/1 "2025-01-30T12:46:47Z")

</div>

**Your software**  
My Mautic version is: 5.2.2  
My PHP version is: 8.1.2  
My Database type and version is: 8.0.40-0ubuntu0.22.04.1

**Your problem**  
My problem is:

If I try to create a segment with a filter, the filter action is not working. I select the user field to perform the filtering, but nothing happens. The upper status bar is just running from left to right.  
The same behavior for form creation.

These errors are showing in the log:

```auto
[2025-01-30T12:43:02.126896+00:00] mautic.ERROR: Exception: Dunno how to handle operator "" (uncaught exception) at /path/to/mautic/docroot/app/bundles/LeadBundle/Segment/Query/Filter/BaseFilterQueryBuilder.php line 45 while running console command `mautic:segments:update` [stack trace]  
#0 /path/to/mautic/docroot/app/bundles/LeadBundle/Segment/ContactSegmentFilter.php(155): Mautic\LeadBundle\Segment\Query\Filter\BaseFilterQueryBuilder->applyQuery()  
#1 /path/to/mautic/docroot/app/bundles/LeadBundle/Segment/Query/ContactSegmentQueryBuilder.php(78): Mautic\LeadBundle\Segment\ContactSegmentFilter->applyQuery()  
#2 /path/to/mautic/docroot/app/bundles/LeadBundle/Segment/ContactSegmentService.php(202): Mautic\LeadBundle\Segment\Query\ContactSegmentQueryBuilder->assembleContactsSegmentQueryBuilder()  
#3 /path/to/mautic/docroot/app/bundles/LeadBundle/Segment/ContactSegmentService.php(42): Mautic\LeadBundle\Segment\ContactSegmentService->getNewSegmentContactsQuery()  
#4 /path/to/mautic/docroot/app/bundles/LeadBundle/Model/ListModel.php(331): Mautic\LeadBundle\Segment\ContactSegmentService->getNewLeadListLeadsCount()  
#5 /path/to/mautic/docroot/app/bundles/LeadBundle/Command/UpdateLeadListsCommand.php(145): Mautic\LeadBundle\Model\ListModel->rebuildListLeads()  
#6 /path/to/mautic/docroot/app/bundles/LeadBundle/Command/UpdateLeadListsCommand.php(120): Mautic\LeadBundle\Command\UpdateLeadListsCommand->rebuildSegment()  
#7 /path/to/mautic/vendor/symfony/console/Command/Command.php(298): Mautic\LeadBundle\Command\UpdateLeadListsCommand->execute()  
#8 /path/to/mautic/vendor/symfony/console/Application.php(1058): Symfony\Component\Console\Command\Command->run()  
#9 /path/to/mautic/vendor/symfony/framework-bundle/Console/Application.php(96): Symfony\Component\Console\Application->doRunCommand()  
#10 /path/to/mautic/vendor/symfony/console/Application.php(301): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand()  
#11 /path/to/mautic/vendor/symfony/framework-bundle/Console/Application.php(82): Symfony\Component\Console\Application->doRun()  
#12 /path/to/mautic/vendor/symfony/console/Application.php(171): Symfony\Bundle\FrameworkBundle\Console\Application->doRun()  
#13 /path/to/mautic/bin/console(16): Symfony\Component\Console\Application->run()  
#14 {main} [] {"hostname":"my-server","pid":123456}
[2025-01-30T12:43:02.127811+00:00] mautic.WARNING: Command `mautic:segments:update` exited with status code 1 [] {"hostname":"my-server","pid":123456}

```

Steps I have tried to fix the problem:  
Cleared the cache and update of Mautic from 5.2.1. to 5.2.2. via Composer

---

<div class="post-metadata">

**Author:** ![mcdiver](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mcdiver/32/6618_2.png) [@mcdiver](https://forum.mautic.org/u/mcdiver)\
**Post date:** [January 31, 2025, 7:13am UTC](https://forum.mautic.org/t/mautic-segment-creation-with-filter-fails-form-creation-fails-too/34896/2 "2025-01-31T07:13:48Z")

</div>

I got some help from AI  
He/she/it recommended updating npm  
A server restart and everything works fine

```auto
composer clear-cache
npm outdated
npm update --legacy-peer-deps
rm -rf node_modules package-lock.json
npm install rimraf@latest glob@latest debug@4.3.4
npm install -g npm-check-updates
npm audit fix --force

```
