String data, right truncated: 1406 Data too long

Hello there,
I’ve dug around for similar questions, but can’t seem to find the solution to an issue I’m running into while setting attributes in step 3.

Error 500
CDbCommand failed to execute the SQL statement: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column ‘setting_data’ at row 1

 
So far, I have verified the status of my DB export, checked the collation, etc. Any recommendations you may have would be appreciated.
Thanks!

8 answers

Profile photo of Mall Staff 184060.00 $tone May 22, 2020
Public

Hi there,

String data, right truncated: 1406 Data too long for column ‘setting_data’ at row 1

That issue occurred because your M1 database had a big volume of Attributes. Please try with these steps to resolve: 
+ Reset data migration in step #3.
+ Run the following SQL query in your M2 database:

ALTER TABLE `ub_migrate_step` CHANGE `setting_data` `setting_data` LONGBLOB NULL DEFAULT NULL COMMENT 'Settings Data';

+ Once done, you re-perform data migration in step #3 as normal.

Regards,
Mall.

#1
Profile photo of newpro 230.00 $tone May 22, 2020
Public

Hi Mall,
Thanks for the speedy reply. I appreciate your help. We do have a huge number of attributes in our system.
I’ve reset the steps, cleared the cache to be safe, run the provided query on the M2 database, but still see the same error. 
Thanks!

#2
Profile photo of Mall Staff 184060.00 $tone May 22, 2020
Public

Hi there,

I’ve reset the steps, cleared the cache to be safe, run the provided query on the M2 database, but still see the same error. 

So, please re-perform all steps as suggested in my reply #1. I have already updated the SQL query in that reply to increase the size of the ‘setting_data’ field in the ub_migrate_step table.

Regards,
Mall.

#3
Profile photo of newpro 230.00 $tone May 22, 2020
Public

Hi Mall,
That did it! I’m very happy to see…

Step #3 migration completed successfully
Total Data Migrated: 29%

Thank you very much.

#4
Profile photo of ubdev Staff 98510.00 $tone May 22, 2020
Public

Hi there, 
 
We’re glad that it helps. 
 
Please move forward with the process at your end. If you come across any other issues, please get back to us here. 
 
PS. Since we’re off during the weekend, our apology for a certain delay in following up with you if you reach out to us this time. 
Regards,
Ubertheme team

#5
Profile photo of mareklesisz 60.00 $tone January 31, 2022
Public

Hello
I have a problem with step 7

CDbCommand failed to execute the SQL statement: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column ‘store_name’ at row 1

Please help me.
Regards
Marek L

#6
Profile photo of Mall Staff 184060.00 $tone February 1, 2022
Public

Hi there,

 CDbCommand failed to execute the SQL statement: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column ‘store_name’ at row 1

That is a bad data case of the data in your M1 database with new rules of the M2 database. Please note that the max length allows on the string value of the ‘store_name’ field is 255 characters.
What is the version of your M2 instance?
Please provide me with more details of the error message you got. I will help to look at the related data table which has the issue as you mentioned.  And I will help you out.
Regards,
Mall.
 

#7

Please login or Register to Submit Answer

Written By

Comments