Skip to content

magento2.4.2

Auto Added by WPeMatico

Elasticsearch7 returns string but not array for the category page

When I tried to load my category page, the following error showing… TypeError: Return value of MagentoElasticsearch7ModelClientElasticsearch::query() must be of the type array, string returned in /home/758955.cloudwaysapps.com/svjdbvkfqv/public_html/vendor/magento/module-elasticsearch-7/Model/Client/Elasticsearch.php:367> Versions details Windows 10 Magento 2.4.2 Elasticsearch 7.6 installed in cloudways I updated… Read More »Elasticsearch7 returns string but not array for the category page

Deleted the Product image, but still the image exists in the product grid in magento 2

I have deleted the product image using following code $imageProcessor = $_objectManager->create(‘MagentoCatalogModelProductGalleryProcessor’); $images = $product->getMediaGalleryImages(); $productGallery = $_objectManager->create(‘MagentoCatalogModelResourceModelProductGallery’); foreach($images as $child) { $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $productGallery = $objectManager->create(‘MagentoCatalogModelResourceModelProductGallery’); $productGallery->deleteGallery($child[‘value_id’]); $product->setMediaGalleryEntries([]); $imageProcessor->removeImage($product, $child[‘file’]); $product->save(); } Image successfully deleted. But due to… Read More »Deleted the Product image, but still the image exists in the product grid in magento 2