Skip to content

magento man

getFirstItem is not working on collection while getData returns an array

getFirstItem is not working on a collection while getData returns a row. $product_obj = $objectManager->create(‘MagentoCatalogModelProduct’); $productCollection = $product_obj->getCollection()->addAttributeToFilter(‘erp_vc_item_code’,$value->getVcItemCode()); print_r($productCollection->getSize()); // Prints 1 print_r($productCollection->getData()); // Prints an array print_r($productCollection->getFirstItem()->getData()); // Does not prints anything print_r($productCollection->getFirstItem()->getSku()); // Does not prints anything Output… Read More »getFirstItem is not working on collection while getData returns an array

Magento Upgrade (2.4.3-p1 >> 2.4.4) Compilation Error

I am upgrading our current site from 2.4.3-p1 to 2.4.4. I had to apply multiple patches for upgrading. However, while running di:compile, its give me error as below MiBInterface “MagentoGraphQlHelperErrorExceptionMessageFormatterInterface” not found#0 /var/www/magento/vendor/composer/ClassLoader.php(571): include() #1 /var/www/magento/vendor/composer/ClassLoader.php(428): ComposerAutoloadincludeFile(‘/var/www/magent…’) #2 [internal function]:… Read More »Magento Upgrade (2.4.3-p1 >> 2.4.4) Compilation Error