While re indexing got an error:

PHP Fatal error: Uncaught Error: Call to undefined method Magento\Customer\Model\Indexer\Source::addAttributeToSelect() in /var/www/html/ncsmokehouse/vendor/magento/framework/Indexer/Handler/AttributeHandler.php:38


Add a function :

public function addAttributeToSelect($fieldName, $alias = null)
       $this->customerCollection->addAttributeToSelect($fieldName, $alias);
       return $this;

in this file /www/vendor/magento/module-customer/Model/Indexer/Source.php

you can override this file because we can't change in core module. it's working

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.