-1

I get the below error in log file

PHP Fatal error:  Uncaught Error: Call to a member function getFrontendInput() on boolean in vendor/magento/module-catalog-import-export/Model/Import/Product.php:2626
Stack trace:
#0 vendor/magento/module-catalog-import-export/Model/Import/Product.php(2561): Magento\CatalogImportExport\Model\Import\Product->parseAttributesWithWrappedValues('color="Flame",f...')
#1 vendor/magento/module-catalog-import-export/Model/Import/Product.php(2541): Magento\CatalogImportExport\Model\Import\Product->getAdditionalAttributes('color="Flame",f...')
#2 vendor/magento/module-catalog-import-export/Model/Import/Product.php(2715): Magento\CatalogImportExport\Model\Import\Product->_parseAdditionalAttributes(Array)
#3 vendor/magento/module-catalog-import-export/Model/Import/Product.php(2748): Magento\CatalogImportExport\Model\Import\Product->_customFieldsMapping(Array)
#4 vendor/magento/module-catalog-import-export/Model/Import/Product.php on line 2626
  • retrieveAttributeByCode() obviously returns a boolean for at least one $attributeCode. I’d start by looking at which attribute code that is and continue debugging why $this->getResource()->getAttribute($attributeCode) returns a boolean for that attribute. Very likely the attribute simply doesn’t exist since Magento\Eav\Model\Entity\AbstractEntity::getAttribute() will return the observed boolean false in that case, see comment in line 411. – pong Mar 4 at 17:32
  • I am new in magento2, I have a lot of products which need to import with their attributes, could you tell me how to investigate the issue to make the process done. How I can get the attribute which cause the problem. – user2641473 Mar 5 at 6:33
0

The new installation probably lacks an attribute you’re trying to import.

Add sth like if(is_bool($attribute)){echo ‘Missing attribute: ‘.$attributeCode;} right after line 2625 in order to identify the culprits.

| improve this answer | |
  • Thanks, I added the code, but where I can find the print, and how the system will print the attributes however there is no products samples on the new updated magento installation. – user2641473 Mar 5 at 11:57
  • Just watch the console output after you started the import from your terminal. You can also save the output to a file or email it to yourself instead of echo’ing it just to name a few possibilities. I don’t understand your second question but let’s start with the unknown attributes. – pong Mar 5 at 14:26

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.