Step 8 fails immediately

Hi there
I am trying to migrate products and failing at step 8, which fails immediately with the error:

CDbCommand failed to execute the SQL statement: 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 ') OR customer_id IS NULL)' at line 1

Inspecting the Net tab, I can see this is coming from this request:
http://scandimini.localhost/pub/ub-tool/index.php/step8/setting?token=c745173d68252b92702f0784be40d410
 
There does not appear to be abything relevant in the ub_data_migration.log:
2017/04/25 19:39:35 [info] [ub_data_migration] Step #3 was skipped successfully.
2017/04/25 19:39:53 [info] [ub_data_migration] Step #4 was skipped successfully.
2017/04/25 22:50:59 [info] [ub_data_migration] Step #3 was skipped successfully.
2017/04/25 22:51:07 [info] [ub_data_migration] Step #4 was skipped successfully.
2017/04/25 22:52:58 [info] [ub_data_migration] Step #6 was skipped successfully.
2017/04/25 22:53:10 [info] [ub_data_migration] Step #7 was skipped successfully.
2017/04/25 22:54:39 [info] [ub_data_migration] Step #7 was skipped successfully.
2017/04/25 22:55:22 [info] [ub_data_migration] Step #7 was skipped successfully.
2017/04/25 22:56:42 [info] [ub_data_migration] Step #7 was skipped successfully.
2017/04/25 22:57:05 [info] [ub_data_migration] Step #3 was skipped successfully.
2017/04/25 22:57:27 [info] [ub_data_migration] Step #6 was skipped successfully.
2017/04/25 23:02:21 [info] [ub_data_migration] Step #7 was skipped successfully.
 
This is on a local dev server, which I am trying to run a successful test on prior to applying to the “master” Magento 2 store.
What information can I provide to help you to help me?
 
Kind regards,
Stuart
 
 
 

  1. Profile photo of scandiminiscandimini 1180.00 $tone April 26, 2017
    Hi MallI am only trying to migrate products - I had previously carried out a migration using v2 of your tool, but there were some issues that arose (simple products not being associated with their parent configurable products) so we need to run in the products again. We could not get the v2 tool running properly with Magento 2.1.6, so we have bought a v3 licence ($800 now).We have put a lot of work into the category data in the interim, between the v2 import and the v3 import, so we do not want to do another full import. However, we were only skipping steps 3, 6 and 7 - the log shows numerous runs through. The final steps included, which still failed, were: 1, 2, 4, 5, 8 (we don't want 8 - but it fails as soon as the page loads, and we don't want 4 but skipping this prevents 5).I have just been back through and selected every item, and I can now load step 8 - so it seems the skip functionality does not work. I need to be able to skip steps.I cannot give you ssh credentials because this is a dev server (my laptop) not a public device.I see in step 8 that there are details for running individual steps via CLI. I will try this.

15 answers

Profile photo of Mall Staff 184060.00 $tone April 26, 2017
Public

Hi there,
Why you have setting to skip steps from #3 -> #7 of our tool? To migrate data in the step #8, you should setting to migrate data in the step #3 -> #7 of our tool.
Other case, let’s provide me the ssh credentials of your Magento2. I will check further and reply you more later.
Regards,
Mall.

#1
Profile photo of plasticalimited 50.00 $tone April 26, 2017
Public

We had the same issue yesterday, when running through the steps the system pre-selects what it thinks needs migrating for each step this was correct so we just clicked ‘Save and continue’ then got the sql error message at the end. We have been back through this morning and on each step unticked at least one boxed then re-ticked it and clicked ‘Save and continue’ we were then able to start the migration process.
Although it has now failed at the sales stage with a sql date issue which we will raise a new ticket for

#3
Profile photo of scandimini 1180.00 $tone April 26, 2017
Public

Hi Mall
I have been back through and selected every step, but managed to skip 6 and 7.
I have tried to run from CLI but get the following error:

Stuarts-MacBook-Pro:release-head stuartbowler$ sudo php bin/ubdatamigration run --step=2
Processing in step #2…
Status: fail
Message: Step #2 has not settings.

I have instead now run from Magento admin. It is failing on step 4:

CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘attribute_set_id’ cannot be null

The log now shows as follows:

2017/04/26 09:26:32 [info] [ub_data_migration] Step #7 was skipped successfully.
2017/04/26 09:42:43 [info] [ub_data_migration] Step #6 was skipped successfully.
2017/04/26 09:42:48 [info] [ub_data_migration] Step #7 was skipped successfully.
2017/04/26 09:43:32 [info] [ub_data_migration] Start running step #2
2017/04/26 09:43:32 [info] [ub_data_migration] Migrated data in step #2 ok with 2 Websites
2017/04/26 09:43:32 [info] [ub_data_migration] Continue running step #2
2017/04/26 09:43:32 [info] [ub_data_migration] (Continued) migrated data in step #2 ok with 2 Store Groups
2017/04/26 09:43:32 [info] [ub_data_migration] Continue running step #2
2017/04/26 09:43:32 [info] [ub_data_migration] (Continued) migrated data in step #2 ok with 2 Stores
2017/04/26 09:43:33 [info] [ub_data_migration] Continue running step #2
2017/04/26 09:43:33 [info] [ub_data_migration] Step #2 was finished.
2017/04/26 09:43:33 [info] [ub_data_migration] ——————--
2017/04/26 09:43:33 [info] [ub_data_migration] Start running step #3
2017/04/26 09:43:33 [info] [ub_data_migration] Migrated data in step #3 ok with 1 Attribute Sets
2017/04/26 09:43:33 [info] [ub_data_migration] Continue running step #3
2017/04/26 09:43:33 [info] [ub_data_migration] (Continued) migrated data in step #3 ok with 9 Attribute Groups
2017/04/26 09:43:33 [info] [ub_data_migration] Continue running step #3
2017/04/26 09:43:36 [info] [ub_data_migration] (Continued) migrated data in step #3 ok with 74 Attributes
2017/04/26 09:43:36 [info] [ub_data_migration] Continue running step #3
2017/04/26 09:43:36 [info] [ub_data_migration] Step #3 was finished.
2017/04/26 09:43:36 [info] [ub_data_migration] ——————--
2017/04/26 09:43:40 [error] [ub_data_migration] CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘attribute_set_id’ cannot be null
 

Unfortunately I cannot provide SSH details because this is a dev server -- it is not public.
Please let me know what other information I can provide.
Regards,
Stuart
 

#4
Profile photo of scandimini 1180.00 $tone April 26, 2017
Public

Hi Mall
I have been through the ReadMe (HTML and MD) and I cannot see any reference to debug mode. Could you please provide details for this?
Regards,
Stuart

#5
Profile photo of Mall Staff 184060.00 $tone April 26, 2017
Public

Hi there,
What version of our tool in your working now? Latest version of our tool now is v3.0.7 and the Readme.html included in the package you have downloaded.
Also, you can enable debug mode of our tool by steps:
Open the php file at pub/ub-too/index.php
and find to the code line:
#ini_set(‘display_errors’, 1);
and replace it by code line:
ini_set(‘display_errors’, 1);
and find to the code line:
#defined(‘YII_DEBUG’) or define(‘YII_DEBUG’, true);
and replace it by code line:
defined(‘YII_DEBUG’) or define(‘YII_DEBUG’, true);
FYI,
Mall.
 

#6
Profile photo of scandimini 1180.00 $tone April 26, 2017
Public

Hi Mall
Yes, we installed this yesterday -- it is v3.0.7
I see there are two readme files -- I was checking the one within app/code/Ubertheme/Ubdatamigration/ and did not notice the one in the original download folder. Thanks for the pointer.
I have now enabled debug mode.
I have tried importing again -- I am now getting the following issue in step 4 when running the migration (steps 1-3 completed ok):

CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘attribute_set_id’ cannot be null. The SQL statement executed was: UPDATE `catalog_category_entity` SET `attribute_set_id`=:yp0, `parent_id`=:yp1, `level`=:yp2, `entity_id`=:yp3, `created_at`=:yp4, `updated_at`=:yp5, `path`=:yp6, `position`=:yp7, `children_count`=:yp8 WHERE `catalog_category_entity`.`entity_id`=’1778′

 

#7
Profile photo of scandimini 1180.00 $tone April 26, 2017
Public

So -- just to make sure you have the full background:

  • We installed v2 some nine months ago, and imported everything from the store at that time (attribute sets / attributes, products, categories, customers, orders etc.)
  • The project stalled for an extended period -- in the interim we updated Magento from 2.0.? to 2.1.6
  • We noticed recently that simple products were sometimes no longer attached to their parent configurable product, so realised that we need to reimport
  • v2 would not compile with Magento 2.1.6, so we have purchased a v3 license
  • v3 is installed correctly via composer
  • We cannot skip all of the steps that we have already completed via v2 and just import the products
  • We cannot afford to lose the category data because a lot of work has been done on those categories (images and descriptions mainly, across approx 1,000 categories)
  • When attempting to migrate using v3, with all steps included, we encounter SQL errors at step 4 (Category import)

All we want to do is reimport the products and, hopefully with the new tool, do so without breaking the simple-configurable relationship.

#8
Profile photo of scandimini 1180.00 $tone April 26, 2017
Public

Sorry -- just want to clarify after re-reading:

We cannot afford to lose the category data because a lot of work has been done on those categories (images and descriptions mainly, across approx 1,000 categories)

What I mean here is that we have implemented a lot of work on the already previously migrated categories within Magento 2 -- and so we need to avoid wiping those categories and reimporting

#9
Profile photo of Admin Staff -30640.00 $tone April 26, 2017
Public

Hi Stuart,
Could you please proceed migration on a live instance where we can directly debug to find the root of issue and provide you workaround? Some of our members run across unexpected issues like you which mostly came from the bad M1 database. However, they worked closely with us and provided the root SSH access which allowed us to provide fast and accurate workaround.
We will keep your site credentials confidential to support your issue only. It’s also safe to send us your credentials here using private reply. 
Thanks for your understanding.
Regards,
An Nguyen

#10
Profile photo of scandimini 1180.00 $tone April 26, 2017
Public

Hi An
Thanks for your response.
We will set up a copy of the dev site on a public server. Unfortunately the data involved is pretty huge, so it will take quite a long time to move DB dumps and media files. I will reply again here once the environment is accessible.
Regards,
Stuart

#11
Profile photo of Mall Staff 184060.00 $tone May 4, 2017
Public

Hi there,
We have checked again status of your current instance. Yet, we find a difficult situation that our v2 version actually entirely differs from our V3 (like the Magento 1 vs. Magento 2). So it’s hard to find a resolution on your current migrated data.
Could you please re-start migration from the ground up on a fresh Magento 2.1.6 instance? We know this is not a perfect solution when you already went this far from your first migration using our V2 tool.
I just want to add a note about the best workflow below for your reference (we noted this in our Readme.html file already):
Step 1 -- Install a fresh Magento 2 instance
Step 2 -- Install UB Data Migration Pro extension
Step 3 -- Proceed data mgiration and verify all migrated data
Step 4 -- Once you complete all of the tasks in step #3, start with themes/extension integration.
Regards,
Mall.

#15

Please login or Register to Submit Answer

Written By

Comments