In custom theme And category page show this error-

Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Catalog\Block\Product\ImageFactory::getLabel() must be of the type string, null given, called in /var/www/html/.....

enter image description here

1 product is added that's why in image show "1 items".

Run all commands upgrade,indexing,caching,deploy,rename var folder still getting this error


Finally,I solved,the problem is etc/view.xml I didn't create while making custom theme.

When I add file (view.xml) at this location


The problem is solved.

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.