xini / silverstripe-mailchimp-signup

Adds page type for a MailChimp signup form. Form fields are read automatically from the MailChimp list.
BSD 3-Clause "New" or "Revised" License
4 stars 6 forks source link

Missing setupFormErrors causes fatal error on template #4

Closed WoodrowShigeru closed 5 years ago

WoodrowShigeru commented 5 years ago

Cannot view the MailChimp Signup Form page that I've set up.

[Emergency] Uncaught BadMethodCallException: Object->__call(): the method 'setupFormErrors' does not exist on 'SilverStripe\Forms\Form'

The SilverStripe 4.0.0 change log describes: setupFormErrors renamed to restoreFormState.

Which is why replacing $form->setupFormErrors(); with $form->restoreFormState(); in src/Pages/SignupPageController.php seems to solve this issue.

Are you sure this add-on is compatible with SS4?


Using PHP 7.2. Excerpt from my composer.json:

"silverstripe/recipe-cms": "4.2.2@stable",
"innoweb/silverstripe-mailchimp-signup": "dev-master"
xini commented 5 years ago

Sorry for this, merged that in from the SS3 branch without checking...

WoodrowShigeru commented 5 years ago

Thanks.