Mage2CatalogProductEntityVarchar: Value is too lon

Hi,

I’m trying to Migrate products, but then I get this error:
Status: fail
Message: Mage2CatalogProductEntityVarchar: Value is too long (maximum is 255 characters).
 
I’ve been looking in the M1 database, but I can’t find any varchar field which is bigger then 255 characters.

Do you have any advice on where to debug? (maybe where this error is being triggered)

1 answer

Profile photo of ubdev Staff 51400.00 $tone November 27, 2019
Public

Hi there, 
That issue referred to a bad data circumstance with the product name. Please try the workaround below to fix it: 
Open the file: pub/ub-tool/protected/controllers/Step5Controller.php
Find the code line:

//uncomment below code lines to using for bad data cases only
/*if (strlen(trim($model2->value)) > 255) {
$model2->value = substr(trim($model2->value), 0, 255);
}*/

Replace it with:

//uncomment below code lines to using for bad data cases only
if (strlen(trim($model2->value)) > 255) {
$model2->value = substr(trim($model2->value), 0, 255);
}

Once done, continue the migration in your step 5 using this command:

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

Hope that helps.
Regards,
Ubertheme team

#1

Please login or Register to Submit Answer

Written By

Comments