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

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

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

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 M2 issue when using the same DB with WordPress

The problem Error message when running setup:upgrade: “Cannot process definition to array for type tinytext” Or: “Types char is not declared” The problem is Magento 2 doesn’t support some data types, it doesn’t allow them in its DB: enum time mediumint tinytext char My suggestion: Don’t ever use the same database with WordPress!!! How to … 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

Magento 2.3.2 File was not uploaded

The problem Recently I fixed a bug relating to “file uploading” function. The situation: Magento 2.3.2 PHP 7.2.20 Files permission is correct The var/log/exception.log doesn’t show the error detail The only clue that I have is the warning: File was not uploaded. After check this Github issue, I figure out that the file’s “mime-type” may … Read more