Delta Migration PHP Error

Hi,
I wanted to make a Deltamigration but after let it run whole night nothing happend.
So today I tried php -f bin/ubdatamigration run --step=7 --mode=update;
And this is what happend:
PHP Error[8192]: Return type of CList::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
in file /home/seedsat/public_html/magento244/pub/ub-tool/yii-1.1.25/collections/CList.php at line 88
Can you help me with this?

  1. Profile photo of caos989caos989 370.00 $tone June 29, 2022
    I changed line 88 to: public function getIterator(): \Traversable { return new \ArrayIterator($this->_d); } I hope this is ok.Now I have:PHP Error[8192]: Return type of CList::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribu te should be used to temporarily suppress the notice in file /home/seedsat/public_html/magento244/pub/ub-tool/yii-1.1.25/collections/CList.php at line 302
  2. Profile photo of caos989caos989 370.00 $tone June 29, 2022
    changed Line 302 and 315 to: public function offsetExists(mixed $offset): boolI don't get any errors anymore but migration does not start and I also can't UB Datamigration in Admin.

24 answers

Profile photo of Mall Staff 184060.00 $tone June 30, 2022
Public

Hi there,

changed Line 302 and 315 to: public function offsetExists(mixed $offset): boolI don’t get any errors anymore but migration does not start and I also can’t UB Datamigration in Admin.

Please discards all the changes you mentioned in the code of our module. And then provide me information about your instance:
+ Admin credentials and URL to the backend of your M2 instance
+ SSH credentials and the path to the M2 root folder
+ Do you upgrade the Magento instance or upgrade the PHP in your M2 server after the first migration with our migration tool?

I will help to check further and get back to you then.
 

Regards,
Mall.
 

#1
Profile photo of Mall Staff 184060.00 $tone June 30, 2022
Public

Hi there,

I couldn’t log in to the backend of your site with the admin credentials that you provided: http://prntscr.com/_Naw6DlwPXT9

I didn’t changed magento or PHP. I installed extensions and Themes and they had a lot of bugs because of PHP 8.1.7 but they should be fixed now.

The SSH credentials are fine. To handle cases with PHP 8.1, I have added more tweak code in the PHP file at the path: /home/seedsat/public_html/magento244/pub/ub-tool/index.php
Please continue with delta migration in step #7 at your end by running the following CLI command:

php -f bin/ubdatamigration run --step=7

Let me know how it goes.
 

Regards,
Mall.
 
 

#3
Profile photo of Mall Staff 184060.00 $tone June 30, 2022
Public

Hi there,

Have the same error again:
[seedsat@sh56 magento244]$ php -f bin/ubdatamigration run --step=7

What happens if you switch to using PHP 7.4.x for data migration?
Regards,
Mall.
 

#5
Profile photo of Mall Staff 184060.00 $tone June 30, 2022
Public

Hi there,

Magento 2.4.4 is not working with 7.4 and your extension should work with PHP 8.1 for actual Magento Versions.

So, can you switch to PHP 8.1.4 version? Because we tested and our migration tool working fine in this PHP version.
Regards,
Mall.

#7
Profile photo of caos989 370.00 $tone July 1, 2022
Public

Deltamigration in Adminmenu was running whole night but didn’t migrate anything.
 
So today I tried it via Terminal again and have this now:
[seedsat@sh56 magento244]$ php -f bin/ubdatamigration run --step=7 --mode=update
[Processing][delta] in step #7: Error: Attempt to assign property “conditions_serialized” on null in /home/seedsat/public_html/ magento244/pub/ub-tool/protected/controllers/Step7Controller.php:948

#10
Profile photo of Mall Staff 184060.00 $tone July 1, 2022
Public

Hi there,

[Processing][delta] in step #7: Error: Attempt to assign property “conditions_serialized” on null in /home/seedsat/public_html/ magento244/pub/ub-tool/protected/controllers/Step7Controller.php:948

It seems that your M1 database has at least one bad data in the value of the ‘salesrule.conditions_serialized’ field.
To handle that case, I have added more tweak code in step #7 of our module. Please continue with delta migration in step #7 by running the CLI command like the following (no need to run with ‘update’ mode this time)

php -f bin/ubdatamigration run --step=7

 
Regards,
Mall.

#11
Profile photo of caos989 370.00 $tone July 1, 2022
Public

it’s here again.
I deleted sales rules after migration in M2 can this be the problem?
 
[seedsat@sh56 magento244]$ php -f bin/ubdatamigration run --step=7
[Processing][run] in step #7: Error: Attempt to assign property “actions_serialized” on null in /home/seedsat/public_html/magento244/pub/ub-tool/protected/controllers/Step7Controller.php:951
Stack trace:
#0 /home/seedsat/public_html/magento244/pub/ub-tool/protected/controllers/Step7Controller.php(208): Step7Controller->_migrateSalesRules(Array, Array, Array, Array, Array, ‘1’)

#12
Profile photo of Mall Staff 184060.00 $tone July 1, 2022
Public

Hi there,

I deleted sales rules after migration in M2 can this be the problem?

Yes maybe.

[Processing][run] in step #7: Error: Attempt to assign property “actions_serialized” on null in

That is another case. It happened with the ‘salesrule.actions_serialized’ field.
I have added more tweak code to handle that case. Please continue by running the following CLI command:

php -f bin/ubdatamigration run --step=7

Regards,
Mall.

#13
Profile photo of caos989 370.00 $tone July 1, 2022
Public

[Processing][run] in step #7: Error: Call to a member function save() on null in /home/seedsat/public_html/magento244/pub/ub-tool/protected/controllers/Step7Controller.php:958
Stack trace:
 

#14
Profile photo of Mall Staff 184060.00 $tone July 1, 2022
Public

Hi there,

[Processing][run] in step #7: Error: Call to a member function save() on null in /home/seedsat/public_html/magento244/pub/ub-tool/protected/controllers/Step7Controller.php:958
Stack trace:

That is strange. It may be related to the deleted migrated sales rules in M2 that you mentioned above.

Let’s try doing these steps:
1. Run the CLI command:

php -f bin/ubdatamigration clean --step=7;

2. Once done, you continue with delta migration in step #7:

php -f bin/ubdatamigration run --step=7

Regards,
Mall.

#15
Profile photo of caos989 370.00 $tone July 1, 2022
Public

got this now:
 
[seedsat@sh56 magento244]$ php -f bin/ubdatamigration run --step=7
[Processing][run] in step #7: …………………………………………………………………………………………………………………………………………………………
[Processing][run] Step #7 migration completed with 22 record(s) in the ‘salesrule’ table.
…………………
[Processing][run] Step #7 migration completed with 12 record(s) in the ‘sales_order_status’ table.
……………………………………………………………………………………………..
Status: fail
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘1803’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `mgd8_sales_order` (

#16
Profile photo of Mall Staff 184060.00 $tone July 1, 2022
Public

Hi there,

Status: fail
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘1803’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `mgd8_sales_order` (

That issue is because you checked ‘KEEP ORIGINAL IDS’ in settings in step #7. And after the first migration, your M2 has at least one newly added sales order. To continue with delta migration in step #7, you must delete all sales order added in M2 which was not migrated by our migration tool. If you can do this, you can try with steps as the following:
1. Run the following SQLs in your M2 database

Delete From salesrule Where rule_id NOT IN (Select m2_id From ub_migrate_map_step_7 where entity_name = 'salesrule');
Delete From salesrule_coupon Where rule_id NOT IN (Select m2_id From ub_migrate_map_step_7 where entity_name = 'salesrule');
Delete From quote Where entity_id NOT IN (Select m2_id From ub_migrate_map_step_7_quote where entity_name = 'sales_flat_quote' OR entity_name = 'sales_flat_quote_active');
Delete From quote_item Where item_id NOT IN (Select m2_id From ub_migrate_map_step_7_quote_item where entity_name = 'sales_flat_quote_item');
Delete From quote_address Where address_id NOT IN (Select m2_id From ub_migrate_map_step_7_quote_address where entity_name = 'sales_flat_quote_address');
Delete From sales_order Where entity_id NOT IN (Select m2_id From ub_migrate_map_step_7_order where entity_name = 'sales_flat_order');
Delete From sales_order_item Where item_id NOT IN (Select m2_id From ub_migrate_map_step_7_order_item where entity_name = 'sales_flat_order_item');
Delete From sales_order_address Where entity_id NOT IN (Select m2_id From ub_migrate_map_step_7_order_address where entity_name = 'sales_flat_order_address');
Delete From sales_invoice Where entity_id NOT IN (Select m2_id From ub_migrate_map_step_7_invoice where entity_name = 'sales_flat_invoice');
Delete From sales_invoice_item Where entity_id NOT IN (Select m2_id From ub_migrate_map_step_7_invoice_item where entity_name = 'sales_flat_invoice_item');
Delete From sales_order_grid Where entity_id NOT IN (Select m2_id From ub_migrate_map_step_7_order where entity_name = 'sales_flat_order');
Delete From sales_invoice_grid Where order_id NOT IN (Select m2_id From ub_migrate_map_step_7_order where entity_name = 'sales_flat_order');

2. Once done, you continue with delta migration in step #7:

php -f bin/ubdatamigration run --step=7

Regards,
Mall.

#17
Profile photo of caos989 370.00 $tone July 1, 2022
Public

Thats strange because I never added a new order to M2 because I know from a previous test installation that it results with 1062 Duplicate entry
 
I will delete all orders and try to run step 7 again

#18
Profile photo of caos989 370.00 $tone July 1, 2022
Public

now I have this error:
[seedsat@sh56 magento244]$ php -f bin/ubdatamigration run --step=7
[Processing][run] in step #7: ….Error: Attempt to assign property “updated_at” on null in /home/seedsat/public_html/magento244/pub/ub-tool/protected/controllers/Step7Controller.php:3704

#19
Profile photo of caos989 370.00 $tone July 2, 2022
Public

It runs 100% but I tried php -f bin/ubdatamigration run --step=7 --mode=update; after that
And it comes to:
[Processing][delta] Step #7 migration completed with 37 record(s) in the ‘sales_flat_order’ table.
Error: Attempt to assign property “customer_tax_class_id” on null in /home/seedsat/public_html/magento244/pub/ub-tool/protected/controllers/Step7Controller.php:1906
Stack trace:

#21
Profile photo of Mall Staff 184060.00 $tone July 3, 2022
Public

Hi there,

[Processing][delta] Step #7 migration completed with 37 record(s) in the ‘sales_flat_order’ table.
Error: Attempt to assign property “customer_tax_class_id” on null in /home/seedsat/public_html/magento244/pub/ub-tool/protected/controllers/Step7Controller.php:1906

Let’s try with steps like the following:
1. Running the CLI command:

php -f bin/ubdatamigration clean --step=7

2. You continue with delta migration in step #7:

php -f bin/ubdatamigration run --step=7

Regards,
Mall.

#22
Profile photo of caos989 370.00 $tone July 3, 2022
Public

after running a while I have this:
Status: fail
Message: Property “Mage2SalesOrder.paypal_ipn_customer_notified” is not defined.

#23
Profile photo of Mall Staff 184060.00 $tone July 4, 2022
Public

Hi there,

Message: Property “Mage2SalesOrder.paypal_ipn_customer_notified” is not defined.

This is because your M2 instance has not had the core module named ‘Magento_Paypal’ installed.
Please consider installing that module. Once done, you can continue with data migration in step #7 by running the CLI command:

php -f bin/ubdatamigration run --step=7

Regards,
Mall.
 
 

#24

Please login or Register to Submit Answer

Written By

Comments