Skip to content

Mageplaza Call to undefined method getCollectionClone()

I am encountering the following problem with Magento and the Mageplaza plugin:

Call to undefined method MagentoCatalogSearchModelResourceModelFulltextCollectionInterceptor::getCollectionClone() at /app/app/code/Mageplaza/LayeredNavigation/Model/Layer/Filter/Price.php:179)"

This is the code snippet in the Price.php file:

/** @var Collection $productCollection */
$productCollection = $this->getLayer()->getProductCollection()
->getCollectionClone()
->setGetAllData(true)
->removeAttributeSearch(['price.from', 'price.to'])
->setGetAllData(false);

If anyone can help me, I would be very grateful.