When I run reindex command bin/magento index:reindex catalog_data_exporter_categories I get the following error on console.

Argument 2 passed to Magento\Catalog\Block\Product\ImageFactory::getLabel()

Kindly find the attached image.

enter image description here

I referred this LINK, but I didn't got any solution.

Kindly guide me if anyone faced this issue.

Thanks in advance

  • At a glance, its seems that error was occurred due to passing wrong argument into Magezon PageBuilder extension. Hope you can make sure by comparing the code of Magento\Catalog\Block\Product\Image Constructor arguments.
    – Wasim
    Commented Jan 12, 2021 at 13:57

1 Answer 1


Hey chris, hope you are doing well.

This is the issue related to theme. try this,

$collection = $this->_objectManager->create('\Magento\Catalog\Model\ResourceModel\Product\Collection');

$collection->addAttributeToFilter('is_saleable', 1, 'left')

The method addAttributeToFilter() is expecting the 2nd parameter $condition to be an array or null, but the theme obviously hasn't been updated. I've changed it from

**$collection->addAttributeToFilter('is_saleable', 1, 'left')**

to...  note 1 -> [1]

**addAttributeToFilter('is_saleable', [1], 'left')**

This works:)

  • where do u want me to change this code
    – chris
    Commented Jan 12, 2021 at 13:28
  • I am getting this too after upgrading! However, if I change the theme used (Content -> Design -> Config) I can successfully view my site! Commented Jan 12, 2021 at 13:30
  • i didn't get u where should i wat to change. can u please guide me
    – chris
    Commented Jan 12, 2021 at 13:32

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.