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.
Steps to Reproduce
No response
Screenshots, screen recording, code snippet
No response
Environment information
No response
WordPress information
No response
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Describe the bug
While testing #51 (see https://github.com/mailchimp/wordpress/pull/51#issuecomment-2339008891) I ran into an issue in the following scenario:
-- Select A List --
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:
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.
Steps to Reproduce
No response
Screenshots, screen recording, code snippet
No response
Environment information
No response
WordPress information
No response
Code of Conduct