Magento 2 log rotation with logrotate

Why? Log rotation is an automated process to remove or archive old and big log files. More information here. Magento 2 log files get bigger every day, it may take too much space and slow down your server. In fact, you can backup and delete Magento log files, but it’s better if there’s an automated … Read more

Fix Magento 2 cron_schedule catalog_product_attribute_value_synchronize error

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento2`.`catalog_product_entity_datetime`, CONSTRAINT `CAT_PRD_ENTT_DTIME_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CAS), query was: INSERT INTO catalog_product_entity_datetime(attribute_id, store_id, entity_id, `value`) VALUES (:attribute_id0,:store_id0,:entity_id0,:value0) ON duplicate KEY UPDATE `value` = VALUES(`value`) The problem Cron schedule return status error when processing … Read more

Magento ON-DEMAND courses are now free until June 30th, 2020

magento2 training overview magenaut blog

Update 2020-08-20 If you already added the free courses, you can still visit and learn them for free via this URL: https://cpcontents.adobe.com/public/newlearner/newlearner_1369e616.html   Today I’ve just discovered the Magento 2 courses for newbies are now free (again). It worth $2500 but it’s now free until June 30th, 2020. If you are new with Magento 2 … Read more

Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\App\ExceptionHandlerInterface

Environment: PHP 7.2 Magento 2.3.4 1. The error Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\App\ExceptionHandlerInterface in /var/www/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50 Stack trace: #0 /var/www/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create(‘Magento\\Framewo…’) #1 /var/www/vendor/magento/framework/App/Http.php(100): Magento\Framework\ObjectManager\ObjectManager->get(‘Magento\\Framewo…’) #2 /var/www/generated/code/Magento/Framework/App/Http/Interceptor.php(14): Magento\Framework\App\Http->__construct(Object(Magento\Framework\App\ObjectManager), Object(Magento\Framework\Event\Manager), Object(Magento\Framework\App\AreaList), Object(Magento\Framework\App\Request\Http), Object(Magento\Framework\App\Response\Http\Interceptor), Object(Magento\Framework\App\ObjectManager\ConfigLoader), Object(Magento\Framework\App\State), Object(Magento\Framework\Registry), NULL) #3 /var/www/vendor/magento/framework/ObjectManager/Factory/Abs in /var/www/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 50 This error is caused by missing abstraction-implementation mapping in app/etc/di.xml. 2. Added this line … Read more

M2 development with Docker

The story Although I have tried so many docker-compose projects, I didn’t find any project that matches my requirement: Uses only Official Images. Simply enough to setup/modify. No extra deployment step from host to containers after changing the code. So I have created a docker-compose project. Below are the reasons for you to use or … Read more

Fix Error: Notice: Array to string conversion

Problem The site is using the Amasty Product Feed extension. If you set the Schedule and trying to save feed profiles: Unable to save feed with ID xx. Error: Notice: Array to string conversion in /magento_dir/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 3105 My environment: PHP 7.2 Magento 2.3.3 Amasty Product Feed 2.5.1 Temporary solution Although I updated the extension … Read more

Rollbar – best freemium tool for Magento 2 error tracking

Introduction Rollbar is a freemium tool that I used to track all my Magento 2 sites. There are so many reasons that I have to use it: I don’t want to use SSH and view the exception.log on a console. The log isn’t included additional information like Browser, OS, and device type. It’s inconvenient to … Read more

Fix error after disable Temando_Shipping

1. The site is facing this error: temando.CRITICAL: “accountId” is required. Enter and try again. {“exception”:”[object] (Magento\\Framework\\Exception\\InputException(code: 0): \”accountId\” is required. Enter and try again. at /path_to_magento_dir/vendor/magento/framework/Exception/InputException.php:91)”} [] 2. I figured out that the Temando_shipping extension causes this issue. So I disabled it by these commands: bin/magento module:disable Temando_Shipping bin/magento setup:upgrade bin/magento setup:di:compile bin/magento indexer:reindex … Read more

Fix Gravity Forms & Magento 2 WordPress Integration confliction

Fatal error: Uncaught Error: Call to a member function get() on null in /magento/dir/vendor/magento/framework/Code/Generator.php:242 Stack trace: #0 /magento/dir/vendor/magento/framework/Code/Generator.php(120): Magento\Framework\Code\Generator->shouldSkipGeneration('logger', 'K', 'KLogger') #1 /wordpress/dir/wp-content/plugins/m2wp/include/classes/M2I_Mage_Autoloader.php(27): Magento\Framework\Code\Generator->generateClass('KLogger') #2 [internal function]: M2I_Mage_Autoloader->load('KLogger') #3 [internal function]: spl_autoload_call('KLogger') #4 /wordpress/dir/wp-content/plugins/gravityforms/includes/logging/logging.php(653): class_exists('KLogger') #5 /wordpress/dir/wp-content/plugins/gravityforms/common.php(4513): GFLogging::include_logger() #6 /wordpress/dir/wp-content/plugins/gravityforms/includes/class-gf-upgrade.php(230): GFCommon::log_debug('GF_Upgrade::set…') #7 /wordpress/dir/wp-content/plugins/gravityforms/includes/cl in /magento/dir/vendor/magento/framework/Code/Generator.php on line 242 This is a very uncommon issue, the … Read more