You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
If no list is selected, the form still shows but doesn't work correctly #53
While testing #51 (see #51 (comment)) I ran into an issue in the following scenario:
Either sign in with a new account or create a new account
On the settings screen, verify no List is selected (should show -- Select A List --
Create a new page and add the Mailchimp block to it
Verify the form shows correctly on the front-end
Try and submit the form with no information or with valid information
If debug is on, you should get the following PHP warning: Undefined array key "field" in /mailchimp/lib/mailchimp/mailchimp.php on line 193
If I debug the response from the request, this is what I get:
{
["type"]=> string(54) "https://mailchimp.com/developer/marketing/docs/errors/"
["title"]=> string(18) "Resource Not Found"
["status"]=> int(404)
["detail"]=> string(42) "The requested resource could not be found."
["instance"]=> string(36) "redacted"
}
I think we can add better defensive programming here to ensure the value we want exists before we try and use it. But would also be ideal in this scenario to not allow the form at all if no valid list has been selected.
Activity