Forum

Thread tagged as: Problem, MailChimp

Mailchimp List not Updating

Hi,

I am doing some local MAMP Pro testing of the new Mailchimp app. I have a simple signup form:

<div class="newsletter-sub">
<perch:form id="subscribe" app="perch_mailchimp" double-optin="false" class="signupform">
<perch:success>
    <p>Thank you!</p>
</perch:success>
    <div>
        <perch:label for="email">Sign Up for our Newsletter</perch:label>
        <perch:input id="email" required="true" type="email" mailer="email" placeholder="Enter your Email Address" />
        <perch:error type="required" for="email">Required</perch:error>
    </div>
    <div>
        <perch:input type="submit" value="Submit" id="btnsubmit" />
        <perch:input type="hidden" value="1" id="confirm" mailer="confirm_subscribe" />
        <perch:input type="hidden" id="list" value="d7d3a95a63" mailer="list" />
    </div>
</perch:form>
</div>

When I fill it in I get the success message, and debug shows Subscribing to: Newgate Clocks which is correct. However the new email is not showing in either Mailchimp or Perch. The API Key is correct, I am not sure what else I need to do. There is this array under the subscribing message which looks like an error but I am not sure:

Array
(
    [headers] => Array
        (
            [url] => https://us12.api.mailchimp.com/3.0/lists/d7d3a95a63/members
            [content_type] => application/problem+json; charset=utf-8
            [http_code] => 400
            [header_size] => 417
            [request_size] => 413
            [filetime] => -1
            [ssl_verify_result] => 0
            [redirect_count] => 0
            [total_time] => 0.901968
            [namelookup_time] => 0.395512
            [connect_time] => 0.395902
            [pretransfer_time] => 0.734015
            [size_upload] => 79
            [size_download] => 259
            [speed_download] => 287
            [speed_upload] => 87
            [download_content_length] => 259
            [upload_content_length] => 79
            [starttransfer_time] => 0.901865
            [redirect_time] => 0
            [redirect_url] => 
            [primary_ip] => 104.82.214.148
            [certinfo] => Array
                (
                )

            [primary_port] => 443
            [local_ip] => 192.168.100.44
            [local_port] => 64242
            [request_header] => POST /3.0/lists/d7d3a95a63/members HTTP/1.0
Host: us12.api.mailchimp.com
User-Agent: DrewM/MailChimp-API/3.0 (github.com/drewm/mailchimp-api)
Accept-Encoding: deflate, gzip
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: apikey 96f550754104cd3a3041562bf6adf0e4-us12
Content-Length: 79


        )

    [body] => {"type":"https://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/","title":"Invalid Resource","status":400,"detail":"The resource submitted could not be validated. For field-specific details, see the 'errors' array.","instance":"","errors":[{"field":"merge_fields","message":"Schema describes object, array found instead"}]}
)

This is my diagnostics summary:

SUMMARY INFORMATION

Perch Runway: 2.8.29, PHP: 5.6.10, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), perch_forms (1.8.3), perch_shop_orders (1.0), perch_shop_products (1.0), perch_shop (1.0.1), perch_members (1.5), perch_mailchimp (3.0)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', 'perch_members', 'perch_shop', 'perch_mailchimp' );
PERCH_LOGINPATH: /admin
PERCH_PATH: /Volumes/Data/g Websites/New Development/Newgate/CLOCKS FINAL 2/admin
PERCH_CORE: /Volumes/Data/g Websites/New Development/Newgate/CLOCKS FINAL 2/admin/core
PERCH_RESFILEPATH: /Volumes/Data/g Websites/New Development/Newgate/CLOCKS FINAL 2/admin/resources
Image manipulation: GD
PHP limits: Max upload 128M, Max POST 128M, Memory: 512M, Total max file upload: 128M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
HTTP_HOST: newgateclocks.dev
DOCUMENT_ROOT: /Volumes/Data/g Websites/New Development/Newgate/CLOCKS FINAL 2
REQUEST_URI: /admin/core/settings/diagnostics/
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
Mike Harrison

Mike Harrison 37 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yup, that's an error. I'll take a look.

Ok thanks Drew

Hi Drew,

Is this an error with my setup or the app? I could do with getting it working this week if possible, so if there is anything I can do please let me know.

Thanks!

Mike

Drew McLellan

Drew McLellan 2638 points
Perch Support

You could add an FNAME field and make it hidden.

Hi Drew, perfect that fixed it.

Enjoy Boston!