-
-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Description
Before migrating to v5 we could use dynamic audience_id based on our environment using the env:
'audience_id' => env('MAILCHIMP_AUDIENCE_ID'),After upgrading I wanted to accomplish the same using the config, but it breaks everything because the config value isn't being replaced
audience_id: '{{ config:mailchimp:audience_id }}'Taken from API call:
"lists/{{ config:mailchimp:audience_id }}"Steps to reproduce
- Add
audience_idto mailcihmp.php config
'audience_id' => env('MAILCHIMP_AUDIENCE_ID'), - Change
audience_idin newsletter.yaml to use config
audience_id: '{{ config:mailchimp:audience_id }}' - Navigate to
/cp/forms/newsletter/edit - See that you get a fatal error
StatamicRadPack\Mailchimp\Fieldtypes\MailchimpField::callApi(): Return value must be of type ?array, bool returned
Environment
Environment
Application Name: Odeon
Laravel Version: 10.48.27
PHP Version: 8.2.26
Composer Version: 2.8.4
Environment: local
Debug Mode: ENABLED
URL: odeon.test
Maintenance Mode: OFF
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: redis
Database: mysql
Logs: stack / daily
Mail: smtp
Queue: sync
Session: redis
Statamic
Addons: 5
Sites: 1
Stache Watcher: Disabled
Static Caching: Disabled
Version: 5.46.0 PRO
Statamic Addons
edalzell/forma: 3.0.1
jacksleight/statamic-bard-mutator: 3.0.3
pecotamic/sitemap: 1.4.7
rias/statamic-redirect: 3.9.3
statamic-rad-pack/mailchimp: 5.2.2