Closed sunnysideup closed 1 year ago
Here is what I did for a temporary fix:
if (strpos($mailChimp->getLastError(), 'has signed up to a lot of lists very recently') === false) {
Hey Nicolaas, Well, that's debatable. The signup failed. Therefore it should show an error. Also, when you look at https://mailchimp.com/developer/marketing/docs/errors/#error-glossary, there is no way of telling what error is a filtering success and what is some other error. What do you think? Cheers
Here is what I did for a temporary fix:
if (strpos($mailChimp->getLastError(), 'has signed up to a lot of lists very recently') === false) {
And then? Do we tell them that signup suceeded? That's not true. Also, what other "errors" like this exist? Also, how reliable is that the text in that error message stays the same?
Well, that's debatable. The signup failed. Therefore it should show an error.
Yes debatable. Here is what I would say in the debate: I am getting 200+ errors from a site about people trying to sign-up. The code - mailchimp - is written in such a way that it blocks spammers. Blocking spammers is not an error, it is a success.
And then? Do we tell them that signup succeeded? That's not true.
Right now, the user also does not know as a E_USER_WARNING
does throw an error on production? (not sure).
Also, what other "errors" like this exist?
Also, how reliable is that the text in that error message stays the same?
Yes - obviously this is a hack. I can see it is a bit risky (but not that risky).
Right now, I am getting lots of errors each day, which makes me miss real errors.
sorry, I think I now understand: you want to not throw an error in these cases, but still show the signup error to the user?
Yes - I think that would make sense.
ok. and I'll replace the user_error
with Injector::inst()->get(LoggerInterface::class)->warning('...');
?
That sounds great.
This is now tagged as 4.8.0 and 5.1.0. Thanks, Nicolaas!
THANK YOU!!!!
I am looking here:
https://github.com/xini/silverstripe-mailchimp-signup/blob/fb1fa073d8a85f0e10ab1db209a50cbe10d08026/src/Extensions/SignupControllerExtension.php#L642-L644
I am getting lots of errors...
It would be great to ignore these errors, because they are not errors, they are "success" in filtering spam.