Error Message in 5th step

I have tryed to migrate but in 5th step showing This error
“Status: fail
Message: Mage2InventorySourceItem: Sku is too long (maximum is 64 characters).”

9 answers

Profile photo of Mall Staff 184060.00 $tone September 20, 2019
Public

Hi there,

“Status: fail
Message: Mage2InventorySourceItem: Sku is too long (maximum is 64 characters).”

That occurred because your database had at least one product’s SKU which had the length of string value greater than 64 characters (which wasn’t allowed in M2 database).
 
To solve that issue, you can do steps below:
 
+ Open the PHP file at: pub/ub-tool/protected/controllers/Step5Controller.php
and find the code lines:

$model2 = new Mage2InventorySourceItem();
$model2->source_code = 'default';
$model2->sku = $sku;

and replace it with:

$model2 = new Mage2InventorySourceItem();
$model2->source_code = 'default';
if(strlen(trim($sku)) > 64) {
$sku = substr(trim($sku), 0, 64);
}
$model2->sku = $sku;

+ Once done, you can continue with the data migration in step #5 by running this command:
php -f bin/ubdatamigration run --step=5;

Regards,
Mall.

#1
Profile photo of Mall Staff 184060.00 $tone September 20, 2019
Public

Hi there,

I am still facing the same error.

That is strange, lets provide me information about your instance:
+ URL and Admin credentials of your site
+ SSH credentials and path to M2 folder
I will help to check further and get back you then.
Regards,
Mall.

#3
Profile photo of Mall Staff 184060.00 $tone September 20, 2019
Public

Hi there,

I have debugged further into your instance and found the root of issue that related to the SKU value which has red border as in this screenshot: https://prnt.sc/p8ibyl
I have changed with the tweak code from:

if(strlen(trim($sku)) > 64) {
$sku = substr(trim($sku), 0, 64);
}

to:

$sku = trim($sku);
if(strlen($sku) > 64) {
$sku = substr($sku, 0, 64);
}

+ And the issue has been solved: https://prnt.sc/p8icxd
You can continue with the data migration in step #5 at your end by running the CLI command:
php -f bin/ubdatamigration run --step=5;

Regards,
Mall.

#5
Profile photo of ubdev Staff 98150.00 $tone September 20, 2019
Public

Hi there, 
Glad that it helps. 
Please continue the process at your end. In case you have any additional question, please get back to us here. 
Regards,
Ubertheme team

#7
Profile photo of gonzalezjperez 50.00 $tone September 20, 2019
Public

Hi i am facing issue in another step (Step 7)
Status: fail
Message: Mage2SalesOrderAggregatedUpdated: Order Status cannot be blank.<br/>Mage2SalesOrderAggregatedUpdated: Order Status cannot be blank.

#8
Profile photo of Mall Staff 184060.00 $tone September 20, 2019
Public

Hi there,

Message: Mage2SalesOrderAggregatedUpdated: Order Status cannot be blank.<br/>Mage2SalesOrderAggregatedUpdated: Order Status cannot be blank.

Please run the below SQL in your M1 database to delete the bad records in the table ‘sales_order_aggregated_updated’:

Delete From sales_order_aggregated_updated Where order_status IS NULL OR order_status = '';

+ Once done, you can continue with data migration in step #7 as normal. 

Regards,
Mall.

#9

Please login or Register to Submit Answer

Written By

Comments