Error when migrating products

Hello,
I get the following error when running step 7.
Status: fail
Message: Mage2SalesQuoteAddressItem: Row Weight is too long (maximum is 12 characters).
Regards,
Dene

1 answer

Profile photo of Mall Staff 184060.00 $tone January 18, 2018
Public

Hi there,

Message: Mage2SalesQuoteAddressItem: Row Weight is too long (maximum is 12 characters).

That issue because your M1’s database has at least one record which has bad data in the value of the row_weight field. The value’s length was over 12 characters and this was not allowed in Magento2 database structure.
To solve that issue, you could do with steps as followings:
+ Open the php file at path: pub/ub-tool/protected/controllers/Step7Controller.php
and find to the code lines:

foreach ($addressItem2->attributes as $key => $value) {
if (isset($addressItem->$key)) {
$addressItem2->$key = $addressItem->$key;
}
}

and replace it by code lines:

foreach ($addressItem2->attributes as $key => $value) {
if (isset($addressItem->$key)) {
$val = trim($addressItem->$key);
if (in_array($key, array('row_weight')) && strlen($val) > 12) {
$val = substr($val, 0, 12);
}
$addressItem2->$key = $val;
}
}

+ Once done, you could continue with data migration in the step #7 of our tool.
Regards,
Mall.

#1

Please login or Register to Submit Answer

Written By

Comments