• Resolved koreatownlosangeles

    (@koreatownlosangeles)


    [2022-08-24 12:03:56] ERROR: Form 7170 > Mailchimp API error: 400 Bad Request. Invalid Resource. The resource submitted could not be validated.
    – ip_signup : This value is not a valid IP. Valid IPs have a format of W.X.Y.Z where each letter represents a number between 0-255.
    Request:
    POST https://us12.api.mailchimp.com/3.0/lists/fa6b44cc4c/members
    {“status”:”pending”,”email_address”:”andr**@ko*************.com”,”interests”:{},”merge_fields”:{},”email_type”:”html”,”ip_signup”:”174.193.131.48, 127.0.0.1, 184.168.224.134, 0.0.0.0, 174.193.131.48″,”tags”:[]}
    Response:
    400 Bad Request
    {“type”:”https://mailchimp.com/developer/marketing/docs/errors/”,”title”:”Invalid Resource”,”status”:400,”detail”:”The resource submitted could not be validated. For field-specific details, see the ‘errors’ array.”,”instance”:”20c75c70-83da-9983-e3cf-0048fec5d4a7″,”errors”:[{“field”:”ip_signup”,”message”:”This value is not a valid IP. Valid IPs have a format of W.X.Y.Z where each letter represents a number between 0-255.”}]}

Viewing 15 replies - 1 through 15 (of 20 total)
  • Thread Starter koreatownlosangeles

    (@koreatownlosangeles)

    Can someone please help with this bug? Verified merge values to be exact as the ones in the mailchimp form.

    same problem here, started today

    Same here. Following this thred for resolution.

    Same here.. have written in a few times over the past 2 days…

    Same here. We didn’t change anything in MailChimp or WordPress. And now: ‘Not a valid IP’.

    Same problem ??

    Plugin Contributor Lap

    (@lapzor)

    Thank you for the reports. We are working on a solution and will release an update to fix the problem soon.

    Great, thank you lap!

    I already got a message from mailchimp support:

    ‘Alright so just confirmed with our Specialist team and it looks like we recently change something on our end to where we now verify IP addresses when they’re sent for contacts and sent over the API.

    With that being said, the actual issue is that it’s Mailchimp for WordPress that’s sending over the bad IP addresses, so ultimately they are the ones that have to fix it.’

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hello,

    This is indeed caused by some new validation on Mailchimp’s side combined with our plugin sending over header values from your server as-is.

    If you update to version 4.8.8 of the Mailchimp for WordPress plugin then you should find this is resolved.

    If not, let us know please!

    • This reply was modified 2 years, 3 months ago by Danny van Kooten. Reason: typo, h key is spotty

    Thank you, it is working now, good job!

    confirming it works here as well. thank you!

    Hello,

    In my case the site uses WAF and the IP has a port. I think that’s why the error keeps appearing.

    [2022-09-07 17:44:21] ERROR: Contact Form 7 > Mailchimp API Error: Bad Request. Invalid Resource. The resource submitted could not be validated.
    - ip_signup : This value is not a valid IP. Valid IPs have a format of W.X.Y.Z where each letter represents a number between 0-255.
    Request:
    POST https://us5.api.mailchimp.com/3.0/lists/27e74966f3/members
    {"status":"subscribed","email_address":"test**@gm***.com","interests":{},"merge_fields":{"FNAME":"Test","LNAME":"Test"},"email_type":"html","ip_signup":"186.4.253.30:61458","tags":[]}
    Response:
    400 Bad Request
    {"type":"https://mailchimp.com/developer/marketing/docs/errors/","title":"Invalid Resource","status":400,"detail":"The resource submitted could not be validated. For field-specific details, see the 'errors' array.","instance":"d67831b6-3334-58fb-003a-47a8675878ae","errors":[{"field":"ip_signup","message":"This value is not a valid IP. Valid IPs have a format of W.X.Y.Z where each letter represents a number between 0-255."}]}
    Plugin Contributor Lap

    (@lapzor)

    If you update your MC4WP plugin to the latest version this issue should be solved.

    Hope that helps. If you have any questions, please let me know!

    I’ve updated the plugin to the latest version. I even uninstalled it and re-installed it, I have also tried to replace the form with the generic code from Mailchimp and I still get the same error.

    [2022-09-14 10:06:08] ERROR: Form 433 > Mailchimp API error: 400 Bad Request. Invalid Resource. The resource submitted could not be validated.
    - ip_signup : This value is not a valid IP. Valid IPs have a format of W.X.Y.Z where each letter represents a number between 0-255.
    Request:
    POST https://us3.api.mailchimp.com/3.0/lists/77658b829e/members
    {"status":"pending","email_address":"amin******@op*******.com","interests":{},"merge_fields":{"FNAME":"Aaron","LNAME":"Minciotti"},"email_type":"html","ip_signup":"174.93.163.17:59449","tags":[]}
    Response:
    400 Bad Request
    {"type":"https://mailchimp.com/developer/marketing/docs/errors/","title":"Invalid Resource","status":400,"detail":"The resource submitted could not be validated. For field-specific details, see the 'errors' array.","instance":"01d554a3-9119-9834-864d-0e48e9191bf4","errors":[{"field":"ip_signup","message":"This value is not a valid IP. Valid IPs have a format of W.X.Y.Z where each letter represents a number between 0-255."}]}

    Hello,

    I had the same problem.. I did a quick fix by myself and It’s working now.

    This is the function that I changed:

    function mc4wp_get_request_ip_address() {
        $ip = null;
        if ( isset( $_SERVER['X-Forwarded-For'] ) ) {
            $ip = $_SERVER['X-Forwarded-For'];
        }
    
        if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
            $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
        }
    
        if ( isset( $_SERVER['REMOTE_ADDR'] ) ) {
            $ip = $_SERVER['REMOTE_ADDR'];
        }
    
        $pos = strpos($ip,":");
        if ($pos === false) {
            return $ip;
        }else{
            return substr($ip,0,$pos-1);
        }
    }
Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Invalid IP Error? Please Help’ is closed to new replies.