• Getting these errors in debug.log

    [27-Jan-2025 03:04:48 UTC] Exception: Invalid API endpoint. in .../wp-content/plugins/mailpoet/lib/API/JSON/API.php:190
    Stack trace:
    #0 .../wp-content/plugins/mailpoet/lib/Subscription/Form.php(33): MailPoet\API\JSON\API->processRoute()
    #1 .../wp-includes/class-wp-hook.php(324): MailPoet\Subscription\Form->onSubmit(Array)
    #2 .../wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
    #3 .../wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #4 .../wp-admin/admin-post.php(61): do_action('admin_post_nopr...')
    #5 {main}

    The error occurs if something, not sure what/how, calls e.g. these URLs:

    /wp-admin/admin-post.php?action=mailpoet_subscription_form&mailpoet_error=1
    /wp-admin/admin-post.php?action=mailpoet_subscription_form&mailpoet_error=2

    The plugin was uninstalled/re-installed via WP admin and also FTP, the issue is still there.

    The same error message has already also been posted here in forum but my reply there that we are affected as well was deleted by some mod so here is a new thread now.

    MailPoet 5.6.2

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Lynn J.a11n

    (@lynnjat7)

    Hi there @ov3rfly,

    Thanks for opening a fresh thread for this – in practice it is always a good idea to open a new thread for your own issues, so we can better track them and respond.

    Do you have any more information about what is happening on the site that is triggering this error? It looks like it might happen when you attempt to edit and then re-save a form. It might also be happening when a customer fills out a subscribe form, especially if that form is not generated using MailPoet but rather comes from a third party forms plugin. Can you give both of these scenarios a try to see if it triggers the error?

    Also, can you check the MailPoet logs under MailPoet > Settings on the “Advanced” tab to see if this same error is listed, but with additional information? Scroll to the bottom of the tab and click “View Logs” to see the logs.

    Lastly, can you share with us your site’s System Info? It’s under MailPoet > Help on the “system info” tab, please do redact any sensitive information as needed.

    Thank you!

    Thread Starter Ov3rfly

    (@ov3rfly)

    It e.g. happens here, if some bot or similar obviously scrapes links in website front end html code and calls the plain action URL from MailPoet form tag without other parameters:

    https://www.example.com/wp-admin/admin-post.php?action=mailpoet_subscription_form

    MailPoet logs is set to record “errors” but does not record anything when the mentioned issue occurs.

    The issue is not related to backend editing or re-saving forms, we recorded IP adresses and they are random worldwide but not logged in user. No third party forms plugin is used.

    Plugin Support Lynn J.a11n

    (@lynnjat7)

    Hi there @ov3rfly,

    Thanks for the clarification. Just to confirm, there’s nothing actually wrong with the MailPoet functionality – subscribers can sign up and you can send email, correct?

    If the issue is that bots are pinging your site and attempting to submit the form, we do recommend activating reCaptcha on your forms. You can use the MailPoet built-in feature or set up Google reCaptcha. More here:
    https://kb.mailpoet.com/article/182-add-captcha-to-your-websites-forms

    Thread Starter Ov3rfly

    (@ov3rfly)

    Bots are not attempting to submit the form. As already explained no form data is sent. Calling the plain action URL from MailPoet form tag without other parameters causes the error. No MailPoet built-in feature or Google reCaptcha will help here. Endpoints should catch all kind of errors and not fail with an exception.

    Plugin Support Lynn J.a11n

    (@lynnjat7)

    Hi there @ov3rfly,

    Thanks for reaching back out, I do understand the issue is that the form submission URL is being pinged and then throws an error due to missing information.

    I have brought this to the attention of our development team and they will evaluate it for priority. As this issue does not affect the actual operation of MailPoet, I expect it to be a lower priority, so there will be no firm ETA for a fix. Please watch future release notes for any updates.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.