# Free Captcha plugin for Mautic 6 with support for Google reCAPTCHA, hCaptcha and Cloudflare Turnstile

**URL:** <https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496>\
**Category:** 3rd Party Addons\
**Created:** [April 11, 2025, 8:34am UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496 "2025-04-11T08:34:56Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardnl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/richardnl/32/11430_2.png) [@richardnl](https://forum.mautic.org/u/richardnl)\
**Post date:** [April 11, 2025, 8:34am UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496/1 "2025-04-11T08:34:56Z")

</div>

A good captcha solution is essential for anyone using Mautic forms. The current plugins had outdated code and limited options. That’s why we’ve been working on a new captcha plugin. The first version is now on Github.

Good to know:

- The plugin is free.
- Support for Google reCAPTCHA, hCaptcha and Cloudflare Turnstile!
- This plugin only works with Mautic 6. So it’s ready for the future, but you’ll have to wait a bit longer to use it in production.

Thank you to everyone who worked on older captcha plugins. And thanks to my colleague Roel who did almost all the work.

Read more about the plugin on the Github page:

> **[GitHub - FireMultimedia/mautic-multi-captcha-bundle: This plugin brings Google's reCAPTCHA, hCaptcha,...](https://github.com/FireMultimedia/mautic-multi-captcha-bundle)**
>
> This plugin brings Google's reCAPTCHA, hCaptcha, and Cloudflare Turnstile integration to Mautic 6.

I would love it if you leave a message in this topic if you use the plugin.

---

<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:** [April 11, 2025, 12:23pm UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496/2 "2025-04-11T12:23:15Z")

</div>

Really nice thank you.  
Do you think it would work on M5 ?

---

<div class="post-metadata">

**Author:** ![richardnl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/richardnl/32/11430_2.png) [@richardnl](https://forum.mautic.org/u/richardnl)\
**Post date:** [April 11, 2025, 12:37pm UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496/3 "2025-04-11T12:37:37Z")

</div>

I was hoping it would work on Mautic 5 too. But unfortunately it doesn’t.

---

<div class="post-metadata">

**Author:** ![ricfreire](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ricfreire/32/14973_2.png) [@ricfreire](https://forum.mautic.org/u/ricfreire)\
**Post date:** [April 12, 2025, 12:55am UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496/4 "2025-04-12T00:55:47Z")

</div>

Hello Richard!

Thank you for making the Mautic community better with your fantastic contribution by sharing this plugin totally free. It will certainly help a lot of people - definitely a must-have! 😃

> [@richardnl](#):
>
> I was hoping it would work on Mautic 5 too. But unfortunately it doesn’t.

Since many Mautic users are often hesitant to upgrade and continue using older versions, having a compatible version for Mautic 5 would be extremely valuable. If you’re able to adapt it, the whole community would benefit - but of course, that’s entirely up to you!

Thanks once again,  
Ricardo

---

<div class="post-metadata">

**Author:** ![richardnl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/richardnl/32/11430_2.png) [@richardnl](https://forum.mautic.org/u/richardnl)\
**Post date:** [April 15, 2025, 7:41am UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496/5 "2025-04-15T07:41:23Z")

</div>

After consulting with my colleague we have decided not to provide support for Mautic 5. But if anyone wants to contribute we will follow up pull requests.

---

<div class="post-metadata">

**Author:** ![richardnl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/richardnl/32/11430_2.png) [@richardnl](https://forum.mautic.org/u/richardnl)\
**Post date:** [May 22, 2025, 11:11am UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496/6 "2025-05-22T11:11:44Z")

</div>

Good news! With limited support, the plugin is now also working with Mautic 5! It has been tested with Mautic 5.2.4.

Download the free captcha plugin for Mautic 5 and 6 on Github: [GitHub - FireMultimedia/mautic-multi-captcha-bundle: This plugin brings Google's reCAPTCHA, hCaptcha, and Cloudflare Turnstile integration to Mautic 6.](https://github.com/FireMultimedia/mautic-multi-captcha-bundle)

---

<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 22, 2025, 2:52pm UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496/7 "2025-05-22T14:52:37Z")

</div>

Thank you so much @richardnl !  
I’m gonna test it asap!

---

<div class="post-metadata">

**Author:** ![beto2l](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/beto2l/32/5365_2.png) [@beto2l](https://forum.mautic.org/u/beto2l)\
**Post date:** [June 8, 2025, 1:33am UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496/8 "2025-06-08T01:33:26Z")

</div>

thanks for the plugin, I followed all the instruccions, but when use it, it appear this message in Mautic logs.

[2025-06-08T01:32:40.731744+00:00] mautic.CRITICAL: Uncaught PHP Exception Doctrine\ORM\ORMInvalidArgumentException: “A new entity was found through the relationship ‘Mautic\FormBundle\Entity\Submission#lead’ that was not configured to cascade persist operations for entity: Mautic\LeadBundle\Entity\Lead with ID #0. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={“persist”}).” at /var/www/html/mautic.opin-x.com/public\_html/vendor/doctrine/orm/src/ORMInvalidArgumentException.php line 103 {“exception”:“[object] (Doctrine\ORM\ORMInvalidArgumentException(code: 0): A new entity was found through the relationship ‘Mautic\FormBundle\Entity\Submission#lead’ that was not configured to cascade persist operations for entity: Mautic\LeadBundle\Entity\Lead with ID #0. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}). at /var/www/html/mautic.opin-x.com/public\_html/vendor/doctrine/orm/src/ORMInvalidArgumentException.php:103)”} {“hostname”:“ip-172-31-28-116”,“pid”:1897}

Y solo ocurre cuando el plugin esta activo y agrego alguno de los captchas al formulario

---

<div class="post-metadata">

**Author:** ![richardnl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/richardnl/32/11430_2.png) [@richardnl](https://forum.mautic.org/u/richardnl)\
**Post date:** [June 11, 2025, 8:41am UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496/9 "2025-06-11T08:41:07Z")

</div>

We have not seen this error message before. We have tested the plugin extensively on 5.2. 4 and 6.0. What version are you on?

Do you have another captcha plugin? Maybe this one is causing a conflict.

---

<div class="post-metadata">

**Author:** ![enableservices](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/enableservices/32/14077_2.png) [@enableservices](https://forum.mautic.org/u/enableservices)\
**Post date:** [June 11, 2025, 12:48pm UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496/10 "2025-06-11T12:48:37Z")

</div>

We are experiencing the same error. We’ve tried hCaptcha and Turnstile options. Oddly the Google ReCaptcha plugin doesn’t show up in the Plugins section.

We’re using Mautic 6.0.2

[2025-06-11T12:42:32.373549+00:00] mautic.CRITICAL: Uncaught PHP Exception Doctrine\ORM\ORMInvalidArgumentException: “A new entity was found through the relationship ‘Mautic\FormBundle\Entity\Submission#lead’ that was not configured to cascade persist operations for entity: Mautic\LeadBundle\Entity\Lead with ID #0. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={“persist”}).” at /path/to/mautic/vendor/doctrine/orm/src/ORMInvalidArgumentException.php line 103 {“exception”:“[object] (Doctrine\ORM\ORMInvalidArgumentException(code: 0): A new entity was found through the relationship ‘Mautic\FormBundle\Entity\Submission#lead’ that was not configured to cascade persist operations for entity: Mautic\LeadBundle\Entity\Lead with ID #0. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}). at /path/to/mautic/vendor/doctrine/orm/src/ORMInvalidArgumentException.php:103)”} {“hostname”:“mauticserver”,“pid”:2532531}

---

<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:** [June 11, 2025, 1:26pm UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496/11 "2025-06-11T13:26:05Z")

</div>

Confirming it works in Mautic 5.x

---

<div class="post-metadata">

**Author:** ![richardnl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/richardnl/32/11430_2.png) [@richardnl](https://forum.mautic.org/u/richardnl)\
**Post date:** [June 12, 2025, 7:57am UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496/12 "2025-06-12T07:57:29Z")

</div>

Do you have another captcha plugin active or used before? I think this cause the issue with Google ReCaptcha not show up in the plugins section.

---

<div class="post-metadata">

**Author:** ![richardnl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/richardnl/32/11430_2.png) [@richardnl](https://forum.mautic.org/u/richardnl)\
**Post date:** [June 12, 2025, 11:42am UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496/13 "2025-06-12T11:42:03Z")

</div>

It looks like you used a different reCAPTCHA plugin in the past, and there are still leftover traces of it in the database. That old plugin needs to be fully removed first.

My advice would be to delete everything from the `plugins` table that contains “captcha” in the name, and then refresh the plugins. We had a similar issue with our demo installation of Mautic 5, and this approach worked for us.

You can run the following SQL query to clean it up:

```auto
REMOVE FROM `plugins` WHERE `id` IN (SELECT `id` FROM `plugins` WHERE `name` LIKE '%captcha%');

```

---

<div class="post-metadata">

**Author:** ![enableservices](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/enableservices/32/14077_2.png) [@enableservices](https://forum.mautic.org/u/enableservices)\
**Post date:** [June 12, 2025, 2:58pm UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496/14 "2025-06-12T14:58:23Z")

</div>

Thanks Richard. Although there were no plugins in the plugins/ directory, there was a single entry in the plugins table for the recaptcha plugin.

Deleting this row fixed the problem.

Appreciate your help on this, and thank you to you and team for the updated plugin which is functioning well now for us.

---

<div class="post-metadata">

**Author:** ![enableservices](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/enableservices/32/14077_2.png) [@enableservices](https://forum.mautic.org/u/enableservices)\
**Post date:** [June 13, 2025, 1:11pm UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496/15 "2025-06-13T13:11:10Z")

</div>

Sorry @richardnl I was mistaken. It only works for leads that are not new.

When I remove the section of code below the captcha check in onFormValidation() it works.

I’m not sure why a post save delete exists in that function as it only runs when the form passes validation.

(this section

```php
        $this->eventDispatcher->addListener(LeadEvents::LEAD_POST_SAVE, function (LeadEvent $event) {
            if ($event->isNew()) {
                $this->leadModel->deleteEntity($event->getLead());
            }
        }, -255);

```

)

---

<div class="post-metadata">

**Author:** ![buggersee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/buggersee/32/13477_2.png) [@buggersee](https://forum.mautic.org/u/buggersee)\
**Post date:** [August 5, 2025, 5:32pm UTC](https://forum.mautic.org/t/free-captcha-plugin-for-mautic-6-with-support-for-google-recaptcha-hcaptcha-and-cloudflare-turnstile/35496/16 "2025-08-05T17:32:20Z")

</div>

Removing this part really solved the issue. Else new Leads will not work.
