How to fix Mage2CustomerEntityDecimal error?

Hello Ubertheme,

Greetings!

I used your tool UB Data Migration Pro. I migrated my Magento 1.9 site to Magento 2.2.5 installation.
Upon migration process. I’m stuck at “Step: 6 Migrate Customers”, It throws an error saying “Mage2CustomerEntityDecimal: Value is too long (maximum is 12 characters).”

Any ideas on how to fix this issue?

Looking forward to hear your response.

Thank you!

3 answers

Profile photo of Mall Staff 184060.00 $tone September 13, 2018
Public

Hi there,

Upon migration process. I’m stuck at “Step: 6 Migrate Customers”, It throws an error saying “Mage2CustomerEntityDecimal: Value is too long (maximum is 12 characters).”

That issue because your database has some records which has bad data in value of the ‘value’ field in table ‘customer_entity_decimal’
To handle for that, you could do steps below:
+ Open the PHP file at path: pub/ub-tool/protected/controllers/Step6Controller.php
and find to the code lines:

if ($table == 'customer_entity_text' && empty($model2->value)) {
$model2->value = 'N/A';
}

and replace it by code lines:

if ($table == 'customer_entity_text' && empty($model2->value)) {
$model2->value = 'N/A';
}
if ($table == 'customer_entity_decimal' && (strlen(trim($model2->value)) > 12)) {
$model2->value = substr(trim($model2->value), 0, 12);
}

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

#

Please login or Register to Submit Answer

Written By

Comments