shopware5 / SwagMigration

Shopware 5 Migration (Import from third party systems)
http://store.shopware.com/en/swag00426/migrating-from-other-shop-systems-to-shopware-4.html
MIT License
17 stars 40 forks source link

fixed profiler and insert query #43

Closed alpham8 closed 1 year ago

alpham8 commented 3 years ago

Hi,

this PR fixes two things:

  1. The profiler wasn't get written, because of spaces and :in the file name. Now it gets written and you're able to see what's happened behind the scenes.
  2. The Insert query had a column amount mismatch: More insert values than defined columns to insert data to:
SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1

#0 /html/engine/Library/Zend/Db/Statement.php(297): Zend_Db_Statement_Pdo->_execute(Array)
#1 /html/engine/Library/Zend/Db/Adapter/Abstract.php(472): Zend_Db_Statement->execute(Array)
#2 /html/engine/Library/Zend/Db/Adapter/Pdo/Abstract.php(232): Zend_Db_Adapter_Abstract->query('INSERT INTO s_a...', Array)
#3 /html/engine/Library/Enlight/Components/Db/Adapter/Pdo/Mysql.php(83): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO s_a...', Array)
#4 /html/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/DbServices/Import/ArticleImporter.php(1030): Enlight_Components_Db_Adapter_Pdo_Mysql->query('INSERT INTO s_a...')
#5 /html/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/DbServices/Import/ArticleImporter.php(168): Shopware\SwagMigration\Components\DbServices\Import\ArticleImporter->setArticleAttributes(Array)
#6 /html/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/DbServices/Import/Import.php(110): Shopware\SwagMigration\Components\DbServices\Import\ArticleImporter->import(Array)
#7 /html/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/Migration/Import/Resource/Product.php(281): Shopware\SwagMigration\Components\DbServices\Import\Import->article(Array)
#8 /html/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/Migration/Import/Resource/Product.php(110): Shopware\SwagMigration\Components\Migration\Import\Resource\Product->migrateProduct(Array, 'make_valid', Object(Enlight_Components_Db_Adapter_Pdo_Mysql), Object(Shopware\SwagMigration\Components\DbServices\Import\Import), 'Die Produkt-Num...', Array)
#9 /html/engine/Shopware/Plugins/Community/Backend/SwagMigration/Controllers/Backend/SwagMigration.php(443): Shopware\SwagMigration\Components\Migration\Import\Resource\Product->run()↵#10 /html/engine/Shopware/Plugins/Community/Backend/SwagMigration/Controllers/Backend/SwagMigration.php(478): Shopware_Controllers_Backend_SwagMigration->runImport('import_products')
#11 /html/engine/Library/Enlight/Controller/Action.php(192): Shopware_Controllers_Backend_SwagMigration->importAction()↵#12 /html/engine/Library/Enlight/Controller/Dispatcher/Default.php(478): Enlight_Controller_Action->dispatch('importAction')
#13 /html/engine/Library/Enlight/Controller/Front.php(228): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp))
#14 /html/engine/Shopware/Kernel.php(188): Enlight_Controller_Front->dispatch()
#15 /html/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(102): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /html/vendor/symfony/http-kernel/HttpCache/HttpCache.php(453): Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle(Object(Shopware\Kernel), Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /html/engine/Shopware/Components/HttpCache/AppCache.php(261): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL)
#18 /html/vendor/symfony/http-kernel/HttpCache/HttpCache.php(238): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true)
#19 /html/engine/Shopware/Components/HttpCache/AppCache.php(102): Symfony\Component\HttpKernel\HttpCache\HttpCache->pass(Object(Symfony\Component\HttpFoundation\Request), true)
#20 /html/shopware.php(122): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request))
#21 {main}

Thank you very much for providing us such a nice migration tool :+1:

Cheers,

alpham8

shopwareBot commented 3 years ago

Hello,

thank you for creating this pull request. I have opened an issue on our Issue Tracker for you. See the issue link: https://issues.shopware.com/issues/PT-12272

Please use this issue to track the state of your pull request.

alpham8 commented 3 years ago

Hi, I added other things to the PR now:

mitelg commented 1 year ago

thanks for your contribution @alpham8 👍🎉💙

sorry, it took us so long for the merge :disappointed: