Forum

Thread tagged as: MailChimp

Mail chimp scheduled tasks Failed

Hi,

I've got a error, when running: https://www.michaelasalon.com/perch/core/scheduled/run.php?secret=2b436f1

I've added a .htaccess to report errors, I made a test error.php, and it reported the php error. but running the scheduled task, it reports no error in the log. But perch scheduled tasks in perch Failed.

I have verified the domain in mail chimp.

mailchimp webhook: https://www.michaelasalon.com/perch/addons/apps/perch_mailchimp/api/webhooks/?secret=2b436f1

mailchimp API key: dd767a...(not showing full key for security) is setup in perch settings.

mailchimp listID: 479f78bbd4, and is in the perch/templates/mailchimp/forms/subscribe.html template

add secret to perch/config file; define('PERCH_SCHEDULE_SECRET', '2b436f1');

I've not set Campaign archive page: /mailchimp/campaign/{campaignSlug} as I don't know that to put for campaignSlug

when I enter a new subscriber and submit. it returns 'Thank you! You are subscribed to our newsletter'

But, mailChimp does not pickup the new subscriber.

subscribe code:

    <?php
        //print "pre: perch_mailchimp_form<br><br>";
        //PerchUtil::output_debug();

        perch_mailchimp_form('forms/subscribe'); 

        //print "post; perch_mailchimp_form<br><br>";
        //PerchUtil::output_debug();
    ?>

template:

<perch:form id="subscribe" app="perch_mailchimp" double-optin="false">

    <perch:success>
        <br>
        <p>Thank you!</p>
        <p>You are subscribed to our newsletter</p>
    </perch:success>

    <div align="center">
        <perch:label for="email">Email</perch:label>
        <perch:input id="email" required="true" type="email" mailer="email" class="form-control required email" />
        <perch:error type="required" for="email">Required</perch:error>
    </div>
    <div align="center">
        <perch:label for="firstname">First name</perch:label>
        <perch:input id="firstname" required="true" type="text" mailer="FNAME" class="form-control" />
        <perch:error type="required" for="firstname">Required</perch:error>
    </div>
    <div align="center">
        <perch:label for="lastname">Last name</perch:label>
        <perch:input id="lastname" required="true" type="text" mailer="LNAME" class="form-control" />
        <perch:error type="required" for="lastname">Required</perch:error>
    </div>
    <div align="center">
        <perch:input type="submit" value="Subscribe" id="btnsubmit" class="btn btn-pill btn-sm btn-default waves-effect waves-light"/>
        <perch:input type="hidden" value="0" id="confirm" mailer="confirm_subscribe" />
        <perch:input type="hidden" id="list" value="479f78bbd4" mailer="list" />
    </div>  

</perch:form>

please help!

kind regards

Tony

diagnostics

Perch information

Perch: 3.0.8
Production mode: Production (100)
Installed apps: content (3.0.8), assets (3.0.8), categories (3.0.8), perch_blog (5.5.1), perch_mailchimp (3.1)
DB driver: PDO
DB tables: perch3_blog_authors (2), perch3_blog_comments (0), perch3_blog_index (156), perch3_blog_posts (2), perch3_blog_posts_to_tags (0), perch3_blog_sections (1), perch3_blog_tags (0), perch3_blogs (1), perch3_categories (7), perch3_category_counts (2), perch3_category_sets (2), perch3_content_index (2311), perch3_content_items (696), perch3_content_regions (382), perch3_mailchimp_campaigns (1), perch3_mailchimp_imports (0), perch3_mailchimp_lists (1), perch3_mailchimp_subscribers (7), perch3_mailchimp_subscriptions (7), perch3_mailchimp_webhooks (1), perch3_menu_items (10), perch3_navigation (0), perch3_navigation_pages (0), perch3_page_templates (1), perch3_pages (11), perch3_resource_log (1388), perch3_resource_tags (2), perch3_resources (308), perch3_resources_to_tags (4), perch3_scheduled_tasks (14), perch3_settings (31), perch3_user_passwords (3), perch3_user_privileges (39), perch3_user_role_privileges (2), perch3_user_roles (2), perch3_users (2)
Users: 2
App runtimes:
<?php
    $apps_list = ['perch_blog','perch_mailchimp'
    ];
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Scheduled tasks for perch_mailchimp: import_data (1 mins)
Editor plug-ins:
H1: 719afbdd492431b736ad4fa44124e4b1
L1: 71d12f843811743f7fff94e1371f0a05
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
installedAt: 3.0.8
update_3.0.8: done
latest_version:
on_sale_version:
headerScheme: light
dashboard: 0
hide_pwd_reset: 0
keyboardShortcuts: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
content_skip_region_list: 0
logoPath: /perch/resources/logo.png
perch_blog_update: 5.0.1
perch_blog_post_url: post.php?s={postSlug}
perch_blog_site_name:
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
perch_blog_comment_notify: 0
perch_mailchimp_api_key: dd767a357e115f259cade209c18f35c9-us16
perch_mailchimp_campaign_url: /mailchimp/campaign/{campaignSlug}
perch_mailchimp_secret: 2b436f1
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: db78335_michaela2
PERCH_DB_SERVER: internal-db.s78335.gridserver.com
PERCH_DB_DATABASE: db78335_michaela2
PERCH_DB_PREFIX: perch3_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: info@michaelasalon.com
PERCH_EMAIL_FROM_NAME: Michaela Mitoi
PERCH_LOGINPATH: /perch
PERCH_PATH: /nfs/c05/h04/mnt/78335/domains/michaelasalon.com/html/perch
PERCH_CORE: /nfs/c05/h04/mnt/78335/domains/michaelasalon.com/html/perch/core
PERCH_RESFILEPATH: /nfs/c05/h04/mnt/78335/domains/michaelasalon.com/html/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_DEBUG:
PERCH_SCHEDULE_SECRET: 2b436f1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_ASSET_VERSION: 5163d57ff611b3cf853b
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /nfs/c05/h04/mnt/78335/domains/michaelasalon.com/html/perch/templates
PERCH_TEMPLATE_FILTERS:
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_XHTML_MARKUP:
PERCH_RWD: 1
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_DEFAULT_BUCKET: default
PERCH_TRANSLATION_ASSIST:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_PRIV_ASSIST:
PERCH_CUSTOM_EDITOR_CONFIGS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown
Hosting settings

PHP: 5.6.21
Zend: 2.6.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: 5.5.57
MySQL server: 5.1.63-rel13.4
Free disk space: 1.69 TB
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dba, dom, hash, fileinfo, filter, ftp, gd, gettext, SPL, iconv, session, intl, json, ldap, mbstring, mcrypt, standard, mysqlnd, mysqli, mysql, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, Reflection, imap, SimpleXML, soap, sockets, exif, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, cgi-fcgi, mhash
GD: Yes
ImageMagick: No
PHP max upload size: 20M
PHP max form post size: 20M
PHP memory limit: 2048M
Total max uploadable file size: 20M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
PWD: /etc/apache2/gs-bin
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/?extended
QUERY_STRING: extended
REQUEST_METHOD: GET
SERVER_PROTOCOL: HTTP/1.1
GATEWAY_INTERFACE: CGI/1.1
REMOTE_PORT: 54874
SCRIPT_FILENAME: /home/78335/domains/michaelasalon.com/html/perch/core/settings/diagnostics/index.php
SERVER_ADMIN: webmaster@michaelasalon.com
DOCUMENT_ROOT: /home/78335/domains/michaelasalon.com/html
REMOTE_ADDR: 81.131.98.8
SERVER_PORT: 80
SERVER_ADDR: 70.32.68.91
SERVER_NAME: www.michaelasalon.com
SERVER_SOFTWARE: Apache/2.2.22
SERVER_SIGNATURE: <address>Apache/2.2.22 Server at www.michaelasalon.com Port 80</address>
PATH: /usr/local/bin:/usr/bin:/bin
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_REFERER: https://www.michaelasalon.com/perch/core/settings/diagnostics/
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/604.3.5 (KHTML, like Gecko) Version/11.0.1 Safari/604.3.5
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_CONNECTION: close
HTTP_COOKIE: PHPSESSID=398cdfcaca958ada8f677b3c8d0a16a4; cmsa=1; _ga=GA1.2.1442148702.1508760034; _gid=GA1.2.199606868.1509555983
HTTP_HOST: www.michaelasalon.com
HTTP_PHPCONF: 1921876107
PHPRC: /home/78335/etc/
SITE_HTMLROOT: /home/78335/domains/michaelasalon.com/html
SITE_CGIROOT: /home/78335/cgi-bin
SITE_ROOT: /home/78335
DATABASE_SERVER: internal-db.s78335.gridserver.com
ACCESS_DOMAIN: s78335.gridserver.com
WM_UCONTROL_XMLRPC_SERVER: https://10.0.0.13
proxy_nokeepalive: 1
force_proxy_request_1_0: 1
SCRIPT_URI: https://www.michaelasalon.com/perch/core/settings/diagnostics/
SCRIPT_URL: /perch/core/settings/diagnostics/
UNIQUE_ID: WfoA@UYgRBkAABWoN7sAAABX
FCGI_ROLE: RESPONDER
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1509556473.4448
REQUEST_TIME: 1509556473
argc: 1

Tony Monckton

Tony Monckton 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you tried with the current version?

Upgraded perch to 3.0.10 (was 3.0.8)

syncing mailchimp subscribers worked. ( I added a new subscriber manually in mailchimp)

but I still get Failed, when I run the scheduled task

FAILED perch_mailchimp import_data Unknown. 01 Nov 2017 20:27:02

when I subscribe using the webpage form.(in footer) https://www.michaelasalon.com/index.php

new subscriber does not appear in perch3_mailchimp_subscribers or in MailChimp

perch3_mailchimp_imports is also empty

I can't subscribe using the form/subscribe.html

I've set confirm_subscribe value 0, and double-optin="false"

<perch:form id="subscribe" app="perch_mailchimp" double-optin="false">
<perch:input type="hidden" value="0" id="confirm" mailer="confirm_subscribe" />

tony

<perch:form id="subscribe" app="perch_mailchimp" double-optin="false">

    <perch:success>
        <br>
        <p>Thank you!</p>
        <p>You are subscribed to our newsletter</p>
    </perch:success>

    <div align="center">
        <perch:label for="email">Email</perch:label>
        <perch:input id="email" required="true" type="email" mailer="email" class="form-control required email" />
        <perch:error type="required" for="email">Required</perch:error>
    </div>
    <div align="center">
        <perch:label for="firstname">First name</perch:label>
        <perch:input id="firstname" required="true" type="text" mailer="FNAME" class="form-control" />
        <perch:error type="required" for="firstname">Required</perch:error>
    </div>
    <div align="center">
        <perch:label for="lastname">Last name</perch:label>
        <perch:input id="lastname" required="true" type="text" mailer="LNAME" class="form-control" />
        <perch:error type="required" for="lastname">Required</perch:error>
    </div>
    <div align="center">
        <perch:input type="submit" value="Subscribe" id="btnsubmit" class="btn btn-pill btn-sm btn-default waves-effect waves-light"/>
        <perch:input type="hidden" value="0" id="confirm" mailer="confirm_subscribe" />
        <perch:input type="hidden" id="list" value="479f78bbd4" mailer="list" />
    </div>  

</perch:form>
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you getting any logged errors?

Hi Drew

what do I put for 'campaignSlug' /mailchimp/campaign/{campaignSlug} in perch mail chimp settings?

would this stop perch mail chimp working, if no campaignSlug is set.

tony

hi, I decided to write my own code. it worked.. posting new subscriber to mailChimp.

it also sync ok in perch mailchimp subscribers

regards

tony