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

Fix SQL Syntax Error in Customer Importer #10

Closed Gugiman closed 8 years ago

Gugiman commented 8 years ago

Add missing Quotes to SQL Statement which deletes in s_campaigns_mailaddresses by mail adress.

Otherwise this error appears:

Error : SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@web.de' at line 2 Trace : #0 /var/www/vagrant/htdocs/public/engine/Library/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute(Array) #1 /var/www/vagrant/htdocs/public/engine/Library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) #2 /var/www/vagrant/htdocs/public/engine/Library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('DELETE FROM s_c...', Array) #3 /var/www/vagrant/htdocs/public/engine/Library/Enlight/Components/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->query('DELETE FROM s_c...', Array) #4 /var/www/vagrant/htdocs/public/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/DbServices/Import/CustomerImporter.php(771): Enlight_Components_Db_Adapter_Pdo_Mysql->query('DELETE FROM s_c...') #5 /var/www/vagrant/htdocs/public/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/DbServices/Import/CustomerImporter.php(295): Shopware\SwagMigration\Components\DbServices\Import\CustomerImporter->newsletterSubscribe(Array) #6 /var/www/vagrant/htdocs/public/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/DbServices/Import/Import.php(229): Shopware\SwagMigration\Components\DbServices\Import\CustomerImporter->import(Array) #7 /var/www/vagrant/htdocs/public/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/Migration/Import/Resource/Customer.php(165): Shopware\SwagMigration\Components\DbServices\Import\Import->customer(Array) #8 /var/www/vagrant/htdocs/public/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/Migration/Import/Resource/Customer.php(77): Shopware\SwagMigration\Components\Migration\Import\Resource\Customer->migrateCustomer(Array, Object(Shopware\SwagMigration\Components\DbServices\Import\Import), '') #9 /var/www/vagrant/htdocs/public/engine/Shopware/Plugins/Community/Backend/SwagMigration/Controllers/Backend/SwagMigration.php(465): Shopware\SwagMigration\Components\Migration\Import\Resource\Customer->run() #10 /var/www/vagrant/htdocs/public/engine/Shopware/Plugins/Community/Backend/SwagMigration/Controllers/Backend/SwagMigration.php(502): Shopware_Controllers_Backend_SwagMigration->runImport('import_customer...') #11 /var/www/vagrant/htdocs/public/engine/Library/Enlight/Controller/Action.php(159): Shopware_Controllers_Backend_SwagMigration->importAction() #12 /var/www/vagrant/htdocs/public/engine/Library/Enlight/Controller/Dispatcher/Default.php(523): Enlight_Controller_Action->dispatch('importAction') #13 /var/www/vagrant/htdocs/public/engine/Library/Enlight/Controller/Front.php(226): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp)) #14 /var/www/vagrant/htdocs/public/engine/Shopware/Kernel.php(175): Enlight_Controller_Front->dispatch() #15 /var/www/vagrant/htdocs/public/vendor/symfony/http-kernel/HttpCache/HttpCache.php(487): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /var/www/vagrant/htdocs/public/engine/Shopware/Components/HttpCache/AppCache.php(255): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #17 /var/www/vagrant/htdocs/public/vendor/symfony/http-kernel/HttpCache/HttpCache.php(258): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true) #18 /var/www/vagrant/htdocs/public/engine/Shopware/Components/HttpCache/AppCache.php(103): Symfony\Component\HttpKernel\HttpCache\HttpCache->pass(Object(Symfony\Component\HttpFoundation\Request), true) #19 /var/www/vagrant/htdocs/public/shopware.php(101): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request)) #20 {main}

mitelg commented 8 years ago

Hi @Gugiman thanks for your PR. this was already fixed with this commit

Gugiman commented 8 years ago

Your referenced commit fixes the same error at a different place. Actually there are two appearings an my PR fixes the second :)

mitelg commented 8 years ago

oh, you are right :grin: my fault! merged your PR, thanks! :+1: