Giter Club home page Giter Club logo

mailchimp's Introduction

Hey there! 👋

This is the very, very beginning of something new. We want to assemble a crew that can work independently of the core Statamic team to build Addons and Starter Kits that serve the community. We're currently figuring out how this will all work but wanted to lock down the org name for now. 😎

mailchimp's People

Contributors

duncanmcclean avatar edalzell avatar godismyjudge95 avatar jackmcdade avatar jmalko avatar jonassiewertsen avatar robdekort avatar ryanmitchell avatar swilla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mailchimp's Issues

Email not in merge fields

Hi

I have selected the form, audience and tag but i cant see the email as an option in the merge fields when doing the setup. I can see the other fields available.

Is there anything that would be blocking this?

Thanks

Can only see 9 audiences in audience Id list

Have added a clients API key, and need to get a specific audience ID, the Mailchimp config page only shows 9 items in the list, where the client has 15, and the one I need is not part of the 9.

Plugins installed:
Statamic v3.1.10
Mailchimp v2.5.5
Aardvark Seo v2.0.10
Duplicator v1.3.0

FR: adding of extra fields

Great job with the add-on, it's super useful! :)
Not sure if I missed something but if I understand correctly then it only imports the email to MC. Is there a way to also add other fields?

e.g. my forms currently include name, phone and a few custom fields.

Thanks!

TypeError on submission

Appreciate the rapid development here, Erin 🙏

Forms are returning this error on submission:

TypeError
Argument 1 passed to Silentz\Mailchimp\Subscriber::get() must be of the type string, null given, called in /home/workwith/vendor/silentz/mailchimp/src/Subscriber.php on line 48 

I’m not 100% that this has only happened on 2.4, but the issue appears to have arisen since we updated. Is that line related?

Exception continuously thrown and logged

Mailchimp is writing an exception to my logs every second. Here's the exception:

[2020-08-17 16:44:28] local.ERROR: Uncaught Symfony\Component\Finder\Exception\DirectoryNotFoundException: The "/Users/cblackwell/Sites/highland/vendor/edalzell/mailchimp/resources/views" directory does not exist. in /Users/cblackwell/Sites/highland/vendor/symfony/finder/Finder.php:589
Stack trace:
#0 /Users/cblackwell/Sites/highland/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(444): Symfony\Component\Finder\Finder->in('/Users/cblackwe...')
#1 Command line code(37): Illuminate\Filesystem\Filesystem->files('/Users/cblackwe...')
#2 Command line code(66): getViews('/Users/cblackwe...', Object(Illuminate\Filesystem\Filesystem), 'mailchimp', '::')
#3 {main}
  thrown {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Uncaught Symfony\\Component\\Finder\\Exception\\DirectoryNotFoundException: The \"/Users/cblackwell/Sites/highland/vendor/edalzell/mailchimp/resources/views\" directory does not exist. in /Users/cblackwell/Sites/highland/vendor/symfony/finder/Finder.php:589
Stack trace:
#0 /Users/cblackwell/Sites/highland/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(444): Symfony\\Component\\Finder\\Finder->in('/Users/cblackwe...')
#1 Command line code(37): Illuminate\\Filesystem\\Filesystem->files('/Users/cblackwe...')
#2 Command line code(66): getViews('/Users/cblackwe...', Object(Illuminate\\Filesystem\\Filesystem), 'mailchimp', '::')
#3 {main}
  thrown at /Users/cblackwell/Sites/highland/vendor/symfony/finder/Finder.php:589)
[stacktrace]
#0 {main}
"} 

And here's my config:

<?php

return [

    /*
     * If you want to add to your mailchimp audience when a user registers, set this to `true`
     */
    'add_new_users' => false,

    /*
     * The form submissions to add to your Mailchimp Audiences
     */
    'forms' => [
        [
            /*
            * A MailChimp audience id. Check the MailChimp docs if you don't know
            * how to get this value:
            * https://mailchimp.com/help/find-audience-id/.
            */
            'audience_id' => 'real-id-in-my-config',

            /*
            * if you need consent before you can subscribe someone, set this to `true`
            */
            'check_consent' => false,

            /*
            * if you're checking for consent, which field is it? Defaults to `'consent'`
            */
            'consent_field' => 'consent',

            /*
            * handle of the form to listen for
            */
            'form' => 'downloadable',

            /*
            * See https://mailchimp.com/help/manage-audience-signup-form-fields/ for details on
            * Mailchimp merge fields
            */
            'merge_fields' => [
                [
                    'tag'        => 'FNAME',
                    'field_name' => 'first_name',
                ],
                [
                    'tag'        => 'LNAME',
                    'field_name' => 'last_name',
                ],
                [
                    'tag'        => 'LANDING',
                    'field_name' => 'url',
                ],
                [
                    'tag'        => 'COMPANY',
                    'field_name' => 'company',
                ],
                [
                    'tag'        => 'JOB_TITLE',
                    'field_name' => 'job_titlez',
                ],
            ],

            /*
            * To have single opt in only, which I don't recommend, set this to `true`.
            * See: https://mailchimp.com/help/single-opt-in-vs-double-opt-in/ for details
            */
            'disable_opt_in' => true,
        ],
    ],
];

I also have MAILCHIMP_APIKEY set in my .env.

Empty Mailchimp Config file

Running php artisan vendor:publish --provider="Edalzell\Mailchimp\ServiceProvider" outputs

<?php

return [
    'forms' => [],
];

Statamic – 3.0.38
PHP – 7.4.7

Include user forms

Hi,

I am building a site with front-end user management. It would be good to be able to include user forms in the Mailchimp signup process as well as standard Statamic forms, particularly the {{ user:register_form }}

Package won't install

Just purchased this tonight and getting this error on install:

Symfony\Component\ErrorHandler\Error\FatalError thrown with message "Access level to Edalzell\Mailchimp\ServiceProvider::bootConfig() must be protected (as in class Statamic\Providers\AddonServiceProvider) or weaker"

Stacktrace:
#0 Symfony\Component\ErrorHandler\Error\FatalError in /Users/dustinleblanc/Sites/unrealist/vendor/edalzell/mailchimp/src/ServiceProvider.php:9

PHP Version:

PHP 7.3.23 (cli) (built: Oct  5 2020 15:56:32) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.23, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.23, Copyright (c) 1999-2018, by Zend Technologies

My composer require section:

    "require": {
        "php": "^7.3.0",
        "edalzell/mailchimp": "^2.0",
        "fideloper/proxy": "^4.0",
        "laravel/framework": "^8.0",
        "laravel/tinker": "^2.0",
        "statamic/cms": "3.0.20",
        "wildbit/swiftmailer-postmark": "^3.3"
    },

New tags not appearing

My client has added new tags to their Mailchimp audience, but these aren’t being detected in the plugin.

We’ve tried:

  1. Clearing Statamic cache
  2. php artisan cache:clear
  3. Tagging existing users with these new tags (in case it was because the tags hadn’t been used)

They have 13 tags associated with their audience, but only 9 appear as options in the CP. The issue is present on local and production sites.

Environment
Statamic 3.0.31 Pro
Laravel 8.9.0
PHP 7.4.11
cnj/seotamic 2.0.2
doublethreedigital/duplicator 1.2.1
edalzell/forma 0.7.2
silentz/mailchimp 2.3.6
spatie/statamic-responsive-images 1.4.0

Composer in Readme.md error

If I run composer require edalzell/statamic-mailchimp as per the Readme instructions I get the following error:

 [InvalidArgumentException]                                                                                                            
  Could not find a matching version of package edalzell/statamic-mailchimp. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (dev). 

It looks like the Add On Installer inside Statamic runs composer require edalzell/mailchimp and that does indeed install the Add On.

Statamic – 3.0.38
PHP – 7.4.7

Error message on install

I get the following error on install. Is this something to worry about as it does say Dependencies updated!

Adding packages: erin-dalzell/mailchimp
Please wait while dependencies are updated via Composer. This may take a while.
The command "php composer.phar update erin-dalzell/mailchimp --prefer-dist --no-dev --optimize-autoloader" failed.
Exit Code: 137(Kill (terminate immediately))

Output:

Error Output:

Loading composer repositories with package information
Updating dependencies
Killed

Dependencies updated!

Improved Error Messages

Thanks to some excellent work from Erin my issue with form non-submission was tracked down to a field being required by Mailchimp but not present in my form.

The form was failing silently so it wasn't obvious this was the problem. Improved error messaging for this sort of issue would have saved time (mostly Erin's!) in this case.

bug: unable to install add-on

running composer require silentz/mailchimp gives the error:

> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
PHP Fatal error:  Access level to Edalzell\Mailchimp\ServiceProvider::bootConfig() must be protected (as in class Statamic\Providers\AddonServiceProvider) or weaker in /Users/luke/sites/domain.com/vendor/silentz/mailchimp/src/ServiceProvider.php on line 56

In ServiceProvider.php line 56:
                                                                               
  Access level to Edalzell\Mailchimp\ServiceProvider::bootConfig() must be pr  
  otected (as in class Statamic\Providers\AddonServiceProvider) or weaker      
                                                                               

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255

Installation failed, reverting ./composer.json to its original content.

This error still happens after running:

rm -rf vendor composer.lock
composer clear-cache
composer install

Mailchimp Config errors

If I paste the suggested code from the Readme file into the mailchimp.php file I get the following error in Statamic:

ParseError
syntax error, unexpected end of file, expecting ']' 

/config/mailchimp.php61

I think there's a missing ], in the example.

If I repair this and fill out the config I still get errors:

ErrorException
Illegal string offset 'form'

vendor/edalzell/mailchimp/src/ServiceProvider.php:50

Please excuse my ignorance if I have missed something glaring here as this is the first time I've used Statamic. It's also unclear in the instructions what the handle is for a form. Is it the name of the YAML file in resources/forms?

Statamic – 3.0.38
PHP – 7.4.7

Listening to wrong event

Hi

Is there anywhere I can see if the add on is communication/sending out anything to MailChimp?

I get no response from MailChimp upon form submission and no error in the log files so I am at a bit of a loss on how to proceed.

The form is submitting fine to Statamic through both Postmark API and log mailer settings. I am working locally.

Won’t deploy

When I try to deploy this to a server – through DeployHQ with composer install --no-progress – the deployment fails with this error:

Error 

  Call to undefined method Illuminate\Cache\FileStore::rememberWithExpiration()

  at vendor/laravel/framework/src/Illuminate/Cache/Repository.php:646
    642▕         if (static::hasMacro($method)) {
    643▕             return $this->macroCall($method, $parameters);
    644▕         }
    645▕ 
  ➜ 646▕         return $this->store->$method(...$parameters);
    647▕     }
    648▕ 
    649▕     /**
    650▕      * Clone cache repository instance.

      +6 vendor frames 
  7   [internal]:0
      Statamic\Extend\Manifest::Statamic\Extend\{closure}("edalzell/forma")

      +17 vendor frames 
  25  [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}(Object(Silentz\Mailchimp\ServiceProvider))
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

There are other addons installed, but Mailchimp is the only one to cause the issue. The issue remains when all addons but Mailchimp are removed, and it disappears when Mailchimp is removed.

Subscribers not being added to the audience

Hi,

I have the addon installed and running locally, and believe I have everything set up correctly. However when I fill in my form, the subscribers are not being added to Mailchimp.

What is the best way of diagnosing what is happening here? Thanks for any help - please let me know if I can provide any futher info.

Mike

Documentation: Step 15 edit

Ran step 15 php please addons:refresh command and terminal said:

→ php please addons:refresh
[✗] This command is deprecated. Please use php please update:addons

Meh?!

FR: Debug mode

Hi @edalzell

Thanks for creating this addon! What do you think about introducing a dedicated debug mode? If active, the subscriptions are written to the log file and the Mailchimp API is never called. Similar to Statamic's log driver for emails.

I could send you a pull request if you think that this feature would be a worthwhile extension.

Cheers

CP Error after install

Hi Erin

Just trying to get the addon setup and I have followed the readme install and added the API key but i am getting the following error.

Symfony\Component\Routing\Exception\RouteNotFoundException
Route [statamic.cp.mailchimp.config.edit] not defined. (View: /home/ploi/my-site.dev/vendor/statamic/cms/resources/views/layout.blade.php)

throw new RouteNotFoundException("Route [{$name}] not defined.");

Not sure if i have missed something else that i need to setup.

I am running Statamic v3.0.46 & php 8

Thanks

FR: Opt-in option

Add a way of opting into the mailing list via a checkbox. Use case would be a Get in Contact form where there's a pre-checked "Add me to your mailing list" checkbox that triggers the addon.

Server Error on "Save"

Hi I'm getting a 500 (Internal Server Error) when I try and click "Save" in the Mailchimp CP Config page. The error has these details in the exception message:

Access level to Stillat\\Proteus\\Document\\Printer::hasNodeWithComments() must be protected (as in class PhpParser\\PrettyPrinter\\Standard) or weaker

It is connecting to my Mailchimp account in the config page as it lists out all my audiences and tags.

This is on a production server and in local and for both versions 2.4.1 & 2.4.2

Not sure if others have had this issue previously or if I am doing something wrong!

Check Permission is working backwords

Hi,

It seems the check permissions is working reverse of what it should do.

If I check "no" the email to check permissions is sent. (& the user is added in the mailchimp list only if I confirm from the email)

If I check "yes" the email is not sent and the user is not added in the mailchimp list.

Can you please help with this?

Thanks,

Update docs to explain primary_email_field

Hi!
I have different forms that use different handles for the email field, and the subscribe wasn't working. I found the primary_email_field in the code and defined it in my config and now my forms work. Maybe add that as an option in the docs? (and in the published config file)

/*
  * Define the handle for the email field to be used. Defaults to email.
  */
'primary_email_field' => 'email',

Thanks!

400: The resource submitted could not be validated.

I’ve connected a formset to MailChimp but logbook is showing the following error on submission:

400: The resource submitted could not be validated. For field-specific details, see the 'errors' array.

The issue only appears when I add the formset to MailChimp (under Form on the settings page), and emails aren’t passed to the corresponding mailing list.

I’ve tried removing the validation from the formset, but that didn’t work.

Formset

store: false
honeypot: email_address
fields:
  user_email:
    display: Email
    validate: email|required
columns:
  - user_email

Javascript Errors

Just went into the settings page and noticed I couldn't trigger any of the toggle buttons. In the console, I see this error...

Unhandled Promise Rejection: TypeError: self.loadFields is not a function. (In 'self.loadFields()', 'self.loadFields' is undefined)

Tested in both latest Chrome and Safari on Mac 10.12.6.

Great Plugin, but will it allow for a checkbox opt in/out on the signup form? Keep up with the great addons!

Form Fields not being ported into MailChimp


Form Submission

first_name: Harvey
last_name: Spector
job_title: Developer
company: Kontrived
email: [email protected]
phone: "07787749980"
address_line1: Some Street
address_line2: Address Line 2
town: Some Town
city: Some City
postcode: Some Postcode
country: GB
message: Test1A
hear_marketing: 'yes'
hear_promotions: 'yes'
hear_news: 'yes'
heard: event
other: Design Event


Formset

title: Contact Page
honeypot: burgo-ref
fields:
first_name:
display: First Name
validate: required
last_name:
display: Last Name
validate: required
job_title:
display: Job Title
company:
display: Company
email:
display: Email
validate: required|email
phone:
display: Phone
message:
display: Message
address_line1:
display: Address Line 1
validate: required
address_line2:
display: Address Line 2
town:
display: Town
city:
display: City
validate: required
postcode:
display: Postcode
validate: required
country:
display: Country
validate: required
hear_marketing:
display: Marketing and Events
hear_promotions:
display: Promotions
hear_news:
display: News and Updates
heard:
display: How did you hear about us?
other:
display: Please Specify
columns:

  • first_name
  • last_name
  • job_title
  • company
  • email
  • phone
  • message
  • address_line1
  • address_line2
  • town
  • city
  • postcode
  • country
  • hear_marketing
  • hear_promotions
  • hear_news
  • heard
  • other
    metrics:
  • type: total
    label: Total Responses
    email:
  • to: [email protected]
    reply_to: '{{ email }}'
    subject: Website Enquiry

These are checkboxes that is a group in MailChimp
hear_marketing: 'yes'
hear_promotions: 'yes'
hear_news: 'yes'

This is a dropdown menu
heard: event

screenshot 2018-07-17 20 32 14

screenshot 2018-07-17 20 32 39

I left out the dropdown menu and the checkboxes in Statamic because they have never been imported.

Does the add-on give any feedback

I'm having a few subscribers, who have unsubscribed in the past, now subscribing to our list again.

Logs are giving me some feedback but some information I'd like to pass onto the user. Is this an option through the add-on?

Currently, we just pass a simple message based on the form:success or form:errors.

Wrong Argument

Don't shoot!

Updated to 2.0.3 and the form is now talking to the app, but submitting the form logs the following error:

[2020-07-30 16:16:13] local.ERROR: Argument 1 passed to Edalzell\Mailchimp\Listeners\AddFromSubmission::handle() must be an instance of Statamic\Forms\Submission, instance of Statamic\Events\SubmissionCreated given 

Control panel save quirks

Two small issues I’ve noticed:

1. Consent field
'consent_field' => 'consent', appears in mailchimp.php even if the user toggles consent off. I’d guess this wouldn’t happen if the user clears consent_field first, but haven’t tested that and it might not be obvious.

When the file saves like this, the CP config page loads without pulling in any of the data saved in mailchimp.php

2. Disable opt-in
a) There’s no option to toggle this setting in the CP.
b) When adding multiple forms, 'disable_opt_in' => false, only appears on the first form, not subsequent ones.

It would be useful to be able to toggle this in the CP on a per-form basis (I think that’s how the Statamic 2 version of this plugin worked?). Rare use case perhaps, but users with multiple audiences this may need to be toggled on/off per form.

FR: Subscribe users to groups

It would be nice if you could subscribe users to groups as well as merge tags.

Groups support checkbox based lists (say example for interests, newsletter types you want to receive). Merge tags only support radio buttons.

2.2.1 update quirks

A couple of quirks in the install/update:

  1. When I updated, Mailchimp became an unlisted addon named Akismet. I removed the previous version and installed from scratch.
  2. On /cp/mailchimp/config/edit I got Undefined index: id , which points at MailchimpAudience.php line 31. Setting the Audience ID through the config file fixed this.

Allowing multiple Lists and Formsets

Whilst we can assign a list to multiple formsets we cannot set multiple list IDs. This would be a useful addition as well as allowing the user to specify which list ID is related to which formset.

Email submissions aren't getting sent the double confirmation email from MC

Alrighty, I've double checked everything and can't figure out why MC is not sending double confirm emails for submissions (I have this turned on per MC recommendation and have checked my spam folder). The submissions are being saved in Statamic and I'm not getting any console errors. Yet no confirmation emails nor new audience contacts.

Also I added the pages that use the MC signup form to be excluded from caching.

I only want to save form submissions to MC, not users.

I reckon something is wrong in my setup and would love your expert eyes. Thanks!

SETUP FILES

mailchimp.php: (includes my MC API KEY in real life)

<?php

return [

    'api_key' => env('MAILCHIMP_APIKEY'),

    users' => false,

    'users' => [
        'audience_id' => '',

        'disable_opt_in' => false,

        'check_consent' => true,

        'consent_field' => 'consent',

        'merge_fields' => [
            [
                'tag'=> '',

                'field_name' => '',
            ],
        ],

        'disable_opt_in' => false,
    ],

    'forms' => [
        [
            'audience_id' => '0c86e539bc',

            'disable_opt_in' => false,

            'check_consent' => true,

            'consent_field' => 'consent',

            'form' => 'Newsletter',

            'merge_fields' => [
                [
                    'tag'=> 'EMAIL',

                    'field_name' => 'email',
                ],
                [
                    'tag'=> 'SIGNUP',

                    'field_name' => 'merge_field',
                ],
            ],

            'disable_opt_in' => false,
        ],
    ],
];

Newsletter template

_newsletter_signup.antlers.html (The partial that includes the newsletter form)

{{ form:newsletter class="w-full" }}
  <div class="lg:flex-row lg:flex lg:items-center lg:justify-between flex flex-col">

    <input type="text" name="honeypot" class="hidden" />

    <div class="w-full space-y-2">
      {{ if success }}
        <p class="sm:text-base sm:leading-6 text-brand-green font-body w-full p-1 italic font-semibold">
          {{ newsletter_signup:confirmation_text }}
        </p>
      {{ else }}
        {{ fields }}
          <div class="lg:flex-row flex">
            <label class="sr-only" for="{{ display }}">{{ display }}</label>
          
            {{ if field:input_type == 'email' }}
              {{ field }}
              <button 
                class="btn rounded-l-none"
                type="submit">
                Sign up
              </button>
            {{ elseif field:handle == 'merge_field' }}
              <input class="hidden"
                      type="text"
                      name="{{ field:handle }}"
                      value="{{ newsletter_signup:merge_field }}" />
            {{ else }}
              <div class="text-xs">
                {{ field }}
              </div>
            {{ /if }}
          </div>
        {{ /fields }}
      {{ /if }}
    </div>

    <div class="lg:mt-0 sm:w-auto lg:ml-4 inline-flex leading-4">
      {{ if success }}
        <button class="btn border-brand-green bg-brand-green btn--xs" type="submit" disabled="">
          <svg class="text-white" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
            <path fill-rule="evenodd"
              d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
              clip-rule="evenodd" />
          </svg>
          submitted
        </button>
      {{ elseif errors }}
        <div class="text-brand-pink p-2 font-semibold">
          {{ errors }}
            {{ value }}<br>
          {{ /errors }}
        </div>
        
      {{ /if }}
    </div>

  </div>

  {{ /form:newsletter }}

newsletter blueprint

resources/blueprints/forms/newsletter.yaml

sections:
  main:
    display: Main
    fields:
      -
        handle: email
        field:
          placeholder: [email protected]
          input_type: email
          display: Email
          type: text
          icon: text
          listable: hidden
          validate:
            - required
            - email
          antlers: false
      -
        handle: consent
        field:
          inline: false
          display: Consent
          type: checkboxes
          icon: checkboxes
          listable: hidden
          options:
            'Yes': 'I agree to receive promotional emails and understand I can unsubscribe at any time.'
          validate:
            - required
      -
        handle: merge_field
        field:
          input_type: text
          antlers: false
          display: 'Merge Field'
          type: text
          icon: text
          listable: hidden
          instructions: 'This is a hidden field and edited via the Globals > Newsletter Signup'

Globals > newsletter

content > globals > newsletter_signup.yaml

title: 'Newsletter Signup'
data:
  header: 'Subscribe to the Workify blog'
  body_text: 'Get our latest insights on building a sustainable business as they''re released.'
  confirmation_text: 'Hurray! Check your email to confirm'
  merge_field: BlogSubscribe

Example Form Submission:

I know the merge tags are getting set correctly because here's a statamic form example YAML file:
(Also I tested to make sure the below email address would receive mail and it can)

email: [email protected]
consent:
  - 'Yes'
merge_field: BlogSubscribe

MC settings

  • I can confirm "Enable double opt in" is enabled on the MC site
  • I've double checked the audience ID and merge tags.
  • I've double checked the API key Im using in my .env is correct and enabled

Versions

Statamic 3.1.24
Mailchimp 2.5.6
PHP 7.4

updates fail because of dependencies

MailChimp is the only add-on added to Statamic. Every update fails because of an error relating to dependencies. My best guess is it has something to do with this add-on.
Latest update to Statamic v2.8.11 renders this error:
"Couldn't install dependencies.
The process has been signaled with signal "9"." When I temporarily delete the add-on upgrade goes fine.

Checkbox on consent boolean/array

Not sure if this is an add-on issue, apologies if not...

I’m using a checkbox field as a consent and submitting the form with this checked returns:

Return value of Silentz\Mailchimp\Subscriber::hasConsent() must be of the type bool, array returned

The relevant part of the blueprint:

-
        handle: mailing_list
        field:
          inline: false
          options:
            'true': 'Subscribe me to the mailing list'
          display: 'Mailing List'
          type: checkboxes
          icon: checkboxes
          listable: hidden

Can anything be done to recognise this field/array? I’d guess a radio would work, but would prefer for users to be able to check/uncheck.

Perhaps I need to set this up a different way?

Documentation.... v2?!

Statamic Mailchimp Add-on Documentation

Usage

This add-on can be used in a couple ways:

  1. When a user is registered, they will be automatically subscribed to your Mailchimp mailing list.
  2. When a form -- a formset created in Statamic's CP > Forms -- is submitted the email field will be used and sent to the specified Mailchimp list.

@edalzell Are these accurate?

Installing

  1. Copy the "addons" folder contents to your Statamic site/addons directory.
  2. Go to CP > Addons > Mailchimp and configure the settings below.
  3. Once settings are good to go, run php please addons:refresh to load the addon's dependencies.
  4. @edalzell **For us n00bs, maybe explain what will happen next?! E.g. Once everything is set, just add your form to the template and this add-on will automatically detect it and route it to the Mailchimp list. (I'm suggesting it because this is the spot I'm lost on.) :) **

Settings

Global Settings

  • Mailchimp Key - The Mailchimp API key; You can find this in your Mailchimp account here: Account > Extras > API Keys

User Settings

  • Add New Users? -- If you're going to add folks automatically when they register, turn this on.

Form(s) Settings

  • Mailchimp List ID -- The Mailchimp List ID; You can find this in your Mailchimp account here: Lists - <Select List> - Settings Drop-down - List name and defaults
  • Disable Opt In? -- Not recommended, but you can disable the Double Opt In
  • Form -- Select the formsets to watch for if you're using a standard Statamic generated form (CP > Forms) instead of a User Registration form.
  • Check Permission? -- Whether or not to check permission before adding them to a list. This is the first opt-in used. ❓ @edalzell Might want to add details on how this works for us n00bs?
  • Permission Field -- If you've selected Check Permissions, pick which field to use. The value must be truthy when selected. (E.g. true or on)
  • Add Merge Field -- ❓ @edalzell How does this work?
  • Add Form -- Add a row to associate another Statamic form to another Mailchimp list; Multiple forms can be associated with the same list, but not vice versa.

❗ Please save each row as you go. E.g. Add a form > Save > Add another > Rinse/Repeat

License

MIT License

Support tags

We'd like to assign tags to contacts who submit our Mailchimp forms. We'll assign a different tag for each form on our site (e.g. footer, contact, blog) to track which forms are effective.

Since we only have one configured form in the addon, we'd like to use our Mailchimp form partial to pass a different value for each place it appears.


P.S. Start charging for this addon.

Error on deploy or when running php please

I am getting this on deploy

In ServiceProvider.php line 12:
syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ',' or ')'

and it happens after I installed the addon on deploy.

Discovered Addon: [32medalzell/forma[39m
Discovered Addon: [32msilentz/mailchimp[39m

I am using php 7.4

If I tried to php please clear stache for example I get this error as well.

Works locally

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.