• Resolved getsnoopy

    (@getsnoopy)


    It seems like whenever I configure the forms to use reCAPTCHA (either the checkbox or the invisible version), submitting the form doesn’t work when included as a shortcode.

    It’s not a shortcode inclusion or other issue, as disabling CAPTCHAs altogether makes the form work just fine even with a shortcode.

    Whenever I use the checkbox option, the network request submits to the server, but without any of the key/token from reCAPTCHA, so the server responds with a Please check the CAPTCHA. error message.

    When I use the invisible option, the email address text box turns green, but the request doesn’t even get made.

    However, when I use the Form Placement option to have MailPoet place the form at a designated location, the form works fine.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support nathvi V. a11n

    (@nathvi)

    Hi @getsnoopy Thanks for this really detailed report — the troubleshooting you’ve already done is super helpful! The fact that forms work perfectly via Form Placement but not when embedded via shortcode is a great clue and narrows things down significantly.

    To help us investigate further, could you share a few things?

    1. Which version of MailPoet are you running? You can find this under MailPoet > Help in your WordPress dashboard. There have been recent improvements to how captcha renders within forms, so if you’re not on the latest version (5.23.0), updating may resolve this.
    2. Could you check your browser’s Developer Console (press F12 → Console tab) when viewing the page with the shortcode-embedded form? Any JavaScript errors — particularly ones mentioning recaptcha, grecaptcha, or mailpoet — would be very helpful for pinpointing the issue.
    3. Are you using any caching or JavaScript optimization plugins? (e.g., WP Rocket, Autoptimize, LiteSpeed Cache, FlyingPress, Perfmatters). These can sometimes prevent reCAPTCHA scripts from loading properly, especially on shortcode-rendered forms.
    4. Could you share the information from MailPoet > Help > System Info? This gives us a snapshot of your setup.
    5. What theme are you using? And is the shortcode placed on a regular page/post, or within a page builder?

    Looking forward to your reply so we can get to the bottom of this! 🙂

    Thread Starter getsnoopy

    (@getsnoopy)

    Sure:

    1. Mailpoet Version: 5.23.2
    2. No errors on the console. When using Invisible mode, there’s nothing on the console. When using Checkbox mode, there’s just the network error that I mentioned above.
    3. No, not using any caching plugin.
    4. Sure; I’ve attached it below.
    5. Theme: Twenty Twenty-Four.
    PHP version: 8.3.6
    MailPoet Free version: 5.23.2
    MailPoet Premium version: N/A
    MailPoet Premium/MSS key:
    WordPress version: 6.9.4
    Database version: 8.0.45
    Web server: Apache
    Server OS: Linux razor 6.8.0-107-generic #107-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 13 19:51:50 UTC 2026 x86_64
    WP info: WP_MEMORY_LIMIT: 40M - WP_MAX_MEMORY_LIMIT: 256M - WP_DEBUG: - WordPress language: en_GB - WordPress timezone: +00:00
    PHP info: PHP max_execution_time: 30 - PHP memory_limit: 256M - PHP upload_max_filesize: 2M - PHP post_max_size: 8M
    Multisite environment?: No
    Current Theme: Twenty Twenty-Four (version 1.4)
    Active Plugin names: action-scheduler/action-scheduler.php, all-in-one-wp-security-and-firewall/wp-security.php, better-search-replace/better-search-replace.php, dropndot-post-subtitle/dropndot-post-subtitle.php, getwid/getwid.php, mailpoet/mailpoet.php, twentig/twentig.php, wp-mail-smtp/wp_mail_smtp.php
    Sending Method: SMTP
    MailPoet Sending Service: Is reachable: Yes - Ping response: 200 HTTP status code - API key state: check_error - Premium key state: check_error
    Sending Frequency: 25 emails every 5 minutes
    MailPoet sending info: Send all site's emails with: default WordPress sending method - Task Scheduler method: Action Scheduler - Default FROM address: [email protected] - Default Reply-To address: [email protected] - Bounce Email Address:
    MailPoet Cron / Action Scheduler: Status: active - Is reachable: Yes - Ping URL: https://example.com/wordpress?mailpoet_router&endpoint=cron_daemon&action=ping - Ping response: pong - Last run start: 2026-04-19 21:39:05 - Last run end: 2026-04-19 21:39:05 - Last seen error: None
    Total number of subscribers: 2
    Plugin installed at: 2026-04-12 08:10:23
    Installed via WooCommerce onboarding wizard: false
    Sending queue status: Status: Unknown - Started at: 2026-04-17 13:47:08 - Emails sent: 0 - Retry attempts: 0 - Last seen error: None
    Data inconsistency status: Orphaned sending tasks: 0 - Orphaned sending task subscribers: 0 - Sending queue without newsletter: 0 - Orphaned subscriptions: 0 - Orphaned links: 0 - Orphaned newsletter posts: 0
    Plugin Support Gui A. a11n

    (@guicmazeredo)

    Hi @getsnoopy,

    Thanks so much for the detailed info — that’s really helpful!

    Looking at your system info, I noticed you have All In One WP Security & Firewall active. Security plugins like this can sometimes interfere with how reCAPTCHA scripts load and communicate with the form, even when there are no visible errors in the console. This could explain why the reCAPTCHA token isn’t being included with the form submission in checkbox mode, and why invisible mode silently fails to fire the request.

    Could you try the following steps?

    Step 1: Rule out a plugin conflict

    Temporarily deactivate All In One WP Security & Firewall, Getwid, and Twentig — then test your shortcode form again with both reCAPTCHA modes. If the form works after that, re-enable them one at a time to identify the culprit.

    Step 2: Run a quick diagnostic

    If the issue persists even with those plugins deactivated, open the page with the shortcode form, press F12 to open the Developer Console, and paste this into the Console tab before submitting the form:

    document.querySelectorAll('.mailpoet_recaptcha_field').forEach(f => console.log('widgetId:', f.value));

    Let us know what value is logged. This will tell us whether the reCAPTCHA widget is being properly initialized on the shortcode-rendered form.

    Step 3: Try the MailPoet Form block as an alternative

    While we investigate, you can work around this by using the MailPoet Form block directly in the block editor instead of the shortcode. In the page editor, click the + button to add a block, search for “MailPoet,” and select your form. This uses a different rendering path and should work with reCAPTCHA enabled.

    Looking forward to hearing how it goes!

    Thread Starter getsnoopy

    (@getsnoopy)

    Hello,

    I’ve ruled out plugin conflicts, as I deactivated both of those plugins to no avail.

    As for the code snippet, here was the output of it (i.e., the element was on the page, but it didn’t have any value in it):

    widgetId: 

    As for the workaround, yes, I’m already using workaround for the time being, but I wanted to surface this issue to you so that you could work on a fix for it.

    Plugin Author Bruna a11n

    (@bruberries)

    Hi @getsnoopy,

    Thank you for the follow up.

    The mechanism we confirmed: when the .mailpoet_recaptcha_field input doesn’t get its widgetId set, MailPoet’s submit handler skips fetching the reCAPTCHA token entirely. In checkbox mode the form submits without the token (server returns “Please check the CAPTCHA.”); in invisible mode the request is never sent at all. Both of your symptoms come from that single cause.

    The reason the widgetId stays empty is that MailPoet uses a strict direct-child jQuery selector (> .mailpoet_recaptcha_field) to find the hidden input — if anything wraps that input (a inserted by wpautop, or a content filter from another plugin), the selector silently misses and the field never gets populated. We reproduced your exact “Please check the CAPTCHA.” failure on a test site by deliberately wrapping the input in a — that confirmed the mechanism end-to-end.

    The catch: on a clean install with just WooCommerce + MailPoet + Akismet + Jetpack on Twenty Twenty-Four, the wrapping doesn’t happen organically — the shortcode form works fine. Which means the trigger is coming from something else on your site, most likely another plugin.

    I know you already deactivated All In One WP Security & Firewall, Getwid, and Twentig with no change — but those were the three we specifically asked about. Could you do a full conflict test? Deactivate all plugins except WooCommerce and MailPoet, then try the shortcode form. If it works, reactivate them one at a time until the bug comes back — that pinpoints the culprit. The ones you haven’t tested yet are action-scheduler, better-search-replace, dropndot-post-subtitle, and wp-mail-smtp.

    Thread Starter getsnoopy

    (@getsnoopy)

    Hello,

    When I tried it just now, it seems to have worked properly. I did notice that there was a MailPoet update that came through sometime last week, so I’m guessing it might’ve had something to do with this issue going away?

    Anyway, this issue seems to have resolved itself now. Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.