0

I'm getting an error Call to undefined method Magento\Customer\Api\Data\CustomerExtension::getIsSubscribed() when running integration tests on my local development environment.

For some reason it seems that some extension attributes are not generated. In this case, Magento_Newsletter should add getIsSubscribed() method to CustomerExtension, but the method is missing. Any ideas why this is happening?

Log output:

Call to undefined method Magento\Customer\Api\Data\CustomerExtension::getIsSubscribed()
 /var/www/html/vendor/magento/module-newsletter/Model/Plugin/CustomerPlugin.php:157
 /var/www/html/vendor/magento/framework/Interception/Interceptor.php:146
 /var/www/html/vendor/magento/framework/Interception/Interceptor.php:153
 /var/www/html/generated/code/Magento/Customer/Model/ResourceModel/CustomerRepository/Interceptor.php:52
2
  • magento.stackexchange.com/a/276407/71181 - try this page maybe this might help you – jibin george Jan 31 '20 at 15:19
  • Thanks for your help, but this didn't solve my problem. The error occurs only when initiating the data for the integration tests by the fixtures. There's no any other problems with Customer extension_attributes. There's no any extension_attributes for Customer in my custom modules. Only Magento core modules are adding those. I added the log output to the original post where you can see that the error is thrown in Magento_Newsletter module. – Matti Teräslahti Feb 3 '20 at 11:50
0

It seems Magento_Newsletter mudule is disabled for your site. Just enable it and run setup:upgrade

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.