The issue with the Magento version some of version its working fine and for some of version its not working.
To solve the problem, you should add the following code in 2 files:
- app/code/Mageplaza/Productslider/Block/CategoryId.php
- app/code/Mageplaza/Productslider/Block/AbstractSlider.php
-At Category.php file, change
foreach ($catIds as $catId) {
$category = $this->_categoryFactory->create()->load($catId);
in line 96 & 97 into
if ($this->getSlider()) {
foreach ($catIds as $catId) {
$category = $this->_categoryFactory->create()->load($catId);
$collection = $this->_productCollectionFactory->create()
->addAttributeToSelect('*')
->addCategoryFilter($category);
foreach ($collection as $item) {
$productIds[] = $item->getData('entity_id');
}
}
}
if ($this->getData('category_id')) {
$category = $this->_categoryFactory->create()->load($catIds);
At AbstractSlider.php, change code in function getDisplayAdditional() into
public function getDisplayAdditional()
{
if($this->getSlider()) {
$display = $this->getSlider()->getDisplayAdditional();
if (!is_array($display)) {
$display = explode(',', $display);
}
}
else{
$display = $this->_helperData->getModuleConfig('general/display_information');
if (!is_array($display)) {
$display = explode(',', $display);
}
}
return $display;
}
Reference :You can check the below Git URL they have given some solution :
https://github.com/mageplaza/magento-2-product-slider/issues/31
https://github.com/mageplaza/magento-2-product-slider/issues/49