EcomDev / sync-magento-2-migration

Release of rough proof of concept from 2018 that allows to import and export millions of products quickly
Open Software License 3.0
59 stars 11 forks source link

Category import is broken due to missing `path` value in insert #3

Closed erfanimani closed 2 years ago

erfanimani commented 2 years ago
Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1364 Field 'path' doesn't have a default value in /var/www/html/sync-magento-2-migration/vendor/zendframework/zend-db/src/Adapter/Driver/Pdo/Statement.php:239
Stack trace:
#0 /var/www/html/sync-magento-2-migration/vendor/zendframework/zend-db/src/Adapter/Driver/Pdo/Statement.php(239): PDOStatement->execute()
#1 /var/www/html/sync-magento-2-migration/src/CategoryImport.php(199): Zend\Db\Adapter\Driver\Pdo\Statement->execute()
#2 /var/www/html/sync-magento-2-migration/src/CategoryImport.php(229): EcomDev\MagentoMigration\CategoryImport->allocateEntityIds(1)
#3 /var/www/html/sync-magento-2-migration/src/CategoryImport.php(76): EcomDev\MagentoMigration\CategoryImport->resolveExternalCategoryIds(Array)
#4 /var/www/html/sync-magento-2-migration/src/Import.php(61): EcomDev\MagentoMigration\CategoryImport->importCategories(Object(Generator))
#5 /var/www/html/sync-magento-2-migration/src/ImportApplication.php(60): EcomDev\MagentoMigration\Import->importCategories( in /var/www/html/sync-magento-2-migration/vendor/zendframework/zend-db/src/Adapter/Driver/Pdo/Statement.php on line 244

Because here we're adding just a parent_id for the ID reservation strategy, but it seems Magento 2.4.3-p1 also requires a path value (and a position and children_count).

@IvanChepurnyi I assume this can be an empty string because it's purely used for ID reservation. Is that correct?