# Condition "Contact tags" not working in my Campaign

**URL:** <https://forum.mautic.org/t/condition-contact-tags-not-working-in-my-campaign/11321>\
**Category:** Product Support\
**Created:** [October 8, 2019, 11:14am UTC](https://forum.mautic.org/t/condition-contact-tags-not-working-in-my-campaign/11321 "2019-10-08T11:14:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bargwo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/bargwo/32/547_2.png) [@bargwo](https://forum.mautic.org/u/bargwo)\
**Post date:** [October 8, 2019, 11:14am UTC](https://forum.mautic.org/t/condition-contact-tags-not-working-in-my-campaign/11321/1 "2019-10-08T11:14:11Z")

</div>

**Your software**  
My Mautic version is: 2.14.0  
My PHP version is: 7.0.33-0ubuntu0.16.04.6

**Your problem**  
I created a campaign that is supposed to send either e-mail A or e-mail B based on contact’s tags. Here you can see the basic tree:  
 ![Capture](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/58283e33690284632b1d612ad97fd9f51f1dbc0e.png)

Contact source is form X, then decision to fill-out said form, then condition based on contact’s tag (verified user?). If the user has the tag send e-mail A (with an offer), if they don’t send e-mail B (verification e-mail).

I have tried with both types of users (having the tag and not having it) and neither of them recieved any e-mail

No errors are showing in the log.

Steps I have tried to fix the problem:

- made sure that e-mails are published, and the right type

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [October 8, 2019, 3:04pm UTC](https://forum.mautic.org/t/condition-contact-tags-not-working-in-my-campaign/11321/2 "2019-10-08T15:04:29Z")

</div>

Hi there, and welcome to the Mautic Community Forums!

Are the emails being sent in other campaigns that don’t use tags?

Are there any errors in your error log at all?

---

<div class="post-metadata">

**Author:** ![bargwo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/bargwo/32/547_2.png) [@bargwo](https://forum.mautic.org/u/bargwo)\
**Post date:** [October 9, 2019, 6:37am UTC](https://forum.mautic.org/t/condition-contact-tags-not-working-in-my-campaign/11321/3 "2019-10-09T06:37:30Z")

</div>

Thanks.

Yes, they are being sent out without issues.

There is one error in my log that keeps popping up:  
“[2019-10-09 00:19:29] mautic.NOTICE: Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Doctrine\DBAL\Query\Expression\ExpressionBuilder::regexp() (uncaught exception) at /var/www/mautic/app/bundles/LeadBundle/Segment/Query/Filter/ForeignValueFilterQueryBuilder.php line 99 while running console command `mautic:segments:update` ”

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [October 14, 2019, 10:40am UTC](https://forum.mautic.org/t/condition-contact-tags-not-working-in-my-campaign/11321/5 "2019-10-14T10:40:13Z")

</div>

> [@bargwo](#):
>
> Call to undefined method Doctrine\DBAL\Query\Expression\ExpressionBuilder::regexp() (uncaught exception)

Please see this bug:

> <https://github.com/mautic/mautic/issues/6639>
>
> \*\*Please DO NOT report security vulnerabilities here. Send them to security@maut…ic.com instead.\*\*
> 
> What type of report is this:
> 
> | Q | A
> | ---| ---
> | Bug report? | X
> | Feature request? | 
> | Enhancement? | 
> 
> \## Description:
> After update from 2.12.1 to 2.14.0 all my combined segments using RegExp stops work.
> 
> When combined RegExp filter with any other filter type like "is empty" or "contains" the mautic segment gets error on processing.
> 
> \`\`\`
> \[Symfony\\Component\\Debug\\Exception\\UndefinedMethodException\]
> Attempted to call an undefined method named "regexp" of class "Doctrine\\DBAL\\Query\\Expression\\ExpressionBuilder".
> \`\`\`
> 
> If using only RegExp types it works.
> 
> 
> \## If a bug:
> 
> | Q | A
> | --- | ---
> | Mautic version | 2.14.0
> | PHP version | PHP 7.0.26
> 
> \### Steps to reproduce:
> 1. Create a new segment
> 2. Add RegExp Filter
> 3. Add another condition like email (is not empty)
> 4. Run cron segment update script (php -q apps/mautic/htdocs/app/console mautic:segments:update)
>  
> \### Log errors: 
> 
> \_Please check for related errors in the latest log file in \[mautic root\]/app/log/ and/or the web server's logs and post them here. Be sure to remove sensitive information if applicable.\_ 
> 
> 
> \[2018-09-24 22:15:04\] mautic.NOTICE: Symfony\\Component\\Debug\\Exception\\FatalThrowableError: Call to undefined method Doctrine\\DBAL\\Query\\Expression\\ExpressionBuilder::regexp() (uncaught exception) at /opt/bitnami/apps/mautic/htdocs/app/bundles/LeadBundle/Segment/Query/Filter/ForeignValueFilterQueryBuilder.php line 99 while running console command \`mautic:segments:update\` \[\] \[\]
> 
> 
> !\[regexp filter error\](https://user-images.githubusercontent.com/9327067/45982574-43e2e180-c027-11e8-9c69-2a5a83c108dd.JPG)

Fixed in 2.14.2 with this PR: [Fixed an error with regex used in the segment filter "URL visited" by Enc3phale · Pull Request #6641 · mautic/mautic · GitHub](https://github.com/mautic/mautic/pull/6641)

So, you should update to resolve that issue 🙂
