No data copied for step 7 after clean action on st

Hi,
During delta upgrade, an error occured:
[Processing][run] in step #7: ..PHP Error[2]: Invalid argument supplied for foreach()
in file /home/dodygrou/public_html/pub/ub-tool/protected/controllers/Step7Controller.php at line 1559
#0 /home/dodygrou/public_html/pub/ub-tool/protected/controllers/Step7Controller.php(1457): Step7Controller->_migrateSalesQuote()
#1 /home/dodygrou/public_html/pub/ub-tool/protected/controllers/Step7Controller.php(254): Step7Controller->_migrateSalesOrders()
……
Then, I searched your Q&A section and fixed the problem by downloading the new clean code and replacing related file (following one Q&A thread), and then issued command: clean — step=7, and then restarted step 7 by issuing:
php bin/ubdatamigration run --step=7
***************
The process is working as we can see the dot continues, and 100 records were copied successfully each time, this command kept running for about 3 days, until it has anohter error: 
***********
Status: fail
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1114 The table ‘sales_invoice ‘ is full. The SQL statement executed was: INSERT INTO `sales_invoice` (`entity_id`, `store_id`, `base_grand_total`, ` shipping_tax_amount`, `tax_amount`, `base_tax_amount`, `store_to_order_rate`, `base_shipping_tax_amount`, ………
***********
Delete the backup copy to free up the space, then continued with step 7… and then the first error came again after a while :
**********
[Processing][run] in step #7: ..PHP Error[2]: Invalid argument supplied for foreach()
in file /home/dodygrou/public_html/pub/ub-tool/protected/controllers/Step7Controller.php at line 1559
#0 /home/dodygrou/public_html/pub/ub-tool/protected/controllers/Step7Controller.php(1457): Step7Controller->_migrateSalesQuote()
#1 /home/dodygrou/public_html/pub/ub-tool/protected/controllers/Step7Controller.php(254): Step7Controller->_migrateSalesOrders()
….
*************
Again, using the new cleaning php code, issued the clean command for step 7, and we are able to do delta on step 7….
 
However, same issue here, it seems like there is no new sales data added to order, invoice, or any record that have not been migrated last time.
 
Please advise if this is normal.
Or does below command migrate all order data from the beginning, not from the record where it stopped last time?
Delta command I used always is: php bin/ubdatamigration run --step=7
new cleaning  code copied from this thread:
https://www.ubertheme.com/question/error-php-error2-invalid-argument-supplied-for/
However, there is no more sales data added to the M2 website
Thanks for your help.
 
Josh
 
 

7 answers

Profile photo of Mall Staff 184060.00 $tone August 6, 2020
Public

Hi Josh,

Or does below command migrate all order data from the beginning, not from the record where it stopped last time?
Delta command I used always is: php bin/ubdatamigration run --step=7

That command helps to migrate the newly added sales data after the first migration.

However, same issue here, it seems like there is no new sales data added to order, invoice, or any record that have not been migrated last time.

That is strange. Please make sure you did finish data migration in step #7 and the database credentials you filled in our module are correct. Please verify the database credentials in configuration file of our module at pub/ub-tool/protected/config/db.php once again. 

Regards,
Mall.

#1
Profile photo of Joshua Denne 200.00 $tone August 6, 2020
Public

Hi, Mall, thank for your prompt reply.
I have double checked, we never changed any passwords, is there any log I can check if log in is incorrect?
Or is there any other way to check the mysql table to see if records are not added to M2 table?
I will also double check the firewall settings. Thanks.
Josh

#2
Profile photo of Mall Staff 184060.00 $tone August 6, 2020
Public

Hi Josh,

Or is there any other way to check the mysql table to see if records are not added to M2 table?

Do you migrate all Websites, Stores views and Customers in your M1 databases?
Please run the following SQL query in your M1 database:

Select count(*) From sales_flat_order;

next, run this SQL query in your M2 database:

Select count(*) From ub_migrate_map_step_7_order Where entity_name = 'sales_flat_order';

and then, run this SQL query in your M2 database:

SELECT MAX(`offset`) FROM `ub_migrate_map_step_7_order`

And provide me the screenshots of the results. I will help to check further and get back to you then.

Regards,
Mall.

#3
Profile photo of Joshua Denne 200.00 $tone August 7, 2020
Public

M1 query:

Select count(*) From sales_flat_order;

result:
count(*)261721
M2:
query: 

Select count(*) From ub_migrate_map_step_7_order Where entity_name = 'sales_flat_order';

Result: 

count(*)
 

257642

 
query: 

SELECT MAX(`offset`) FROM `ub_migrate_map_step_7_order`

Result: 

MAX(`offset`)
 

0

Regards,
Josh

#4
Profile photo of Mall Staff 184060.00 $tone August 7, 2020
Public

Hi Josh,

M1: result: count(*) -- 261721

M2: result: count(*) -- 257642

It indicated that there are 261721 -- 257642 = 4079 sales order which weren’t migrated yet.
Did you see the ‘finished’ status in step #7?

Please provide me information of your instance:

  • URL and admin credentials of your M2 instance
  • SSH credentials of your M2 instance
  • Let me know the path to your M2 folder

I will help to check further and get back to you then.
PS. Please make sure you mark your reply private or simply switch this ticket to the private mode. Then it’s safe to share your site info here, only you and our technical team can access it. 

Regards,
Mall.
 

#5
Profile photo of Joshua Denne 200.00 $tone August 7, 2020
Public

Hi Mall, interestingly, the sales records were being migrated this morning, I can see records are added to M2 database now.
I actually waited for almost one week to get duplicated record error yesterday, and after digging into the database, and delete some records, and re-issued the command to continue step 7, it worked.
It looks like the extensions may started a fresh migrating on step 7 (I may accidentally deleted something and trigger that action.)
I issued the command to clean up Step 7 after deleting some records to eliminate the error for duplicated records, and proceeded with the command to continue the step 7.
Thanks for your assistance. I will wait and see how it goes.
Have a nice day and stay safe.
Josh

#6
Profile photo of ubdev Staff 98150.00 $tone August 7, 2020
Public

Hi Josh, 
Yes, please move forward with the migration process at your end. In case you have any additional questions, please do let us know. 
PS. Since our team is off during the weekend, our apology for a certain delay in response if you reach out to us during this time. 
Regards,
Ubertheme team

#7

Please login or Register to Submit Answer

Written By

Comments