Skip to content
Grav 2.0 is officially stable. Read the announcement →
Plugins

Mailchimp API not being passed?

Started by Daniel Wrightson 6 years ago · 0 replies · 448 views
6 years ago

Not sure what's going on here but the Mailchimp plugin is throwing an error:

PHP
$mailchimp = new ErrorLoggingMailChimp(
       new MailChimp($this->grav['config']->get('plugins.mailchimp.api_key')),
       $this->grav['log']

Which looks to me like the Mailchimp API isn't being pulled in - but I've added it to the plugin settings - then, to be sure I've added it to the config file directly.

My form setup looks like this:

YAML
forms:
    RichiediGuida:
        fields:
            -
                name: Nome
                type: text
                label: 'Nome'
                placeholder: 'Il tuo nome'
            -
                name: Cognome
                type: text
                label: 'Cognome'
                placeholder: 'Il tuo Cognome'
            -
                name: email
                type: email
                label: Email
                placeholder: La mail (invieremo qui la tua guida gratuita)'
                validate:
                    required: true
                    message: 'Senza mail non possiamo inviarti la guida'
        buttons:
            -
                type: Submit
                value: 'Si, voglio la guida gratuita'
        process:
            save:
                fileprefix: contact-
                dateformat: Ymd-His-u
                extension: txt
                body: '{% include ''forms/data.txt.twig'' %}'
            mailchimp:
                required_fields: [email]
            email:
                subject: '[Richiesta Guida] {{ form.value.name|e }}'
                body: '{% include ''forms/data.html.twig'' %}'
            reset: true
            display: thankyou
---

Thanks for any help/ideas...

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Vladimir Novak, 2 weeks ago
3 292 2 weeks ago
Plugins · by Mathieu Lecouturier, 3 weeks ago
3 277 3 weeks ago
Plugins · by Slebeig, 2 months ago
1 403 2 months ago
Plugins · by Rene, 2 months ago
2 574 2 months ago
Plugins · by Xavier, 3 months ago
2 490 3 months ago