After migration Magento 1 to 2.3.4, I have facing an error on some product edit.

Argument 1 passed to Magento\Catalog\Model\ProductRepository::getProductFromLocalCache() must be of the type string, null given, called in /srv/public_html/vendor/magento/module-catalog/Model/ProductRepository.php on line 270

Can you please help me to resolve this error ?

Thank you

2 Answers 2


For affected product has no SKU. Add SKU for that product this error will be fixed. You can update directly from MySQL, the table name is: catalog_product_entity


There is some blank SKU save into admin section so you need to change status for that.

UPDATE **prefix_**catalog_product_entity SET sku='' WHERE sku IS NULL;

Just run above query using you prefix if you have than check you admin section working properly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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