Attribute code

Hi Ubertheme,
After migration I got the following error in the magento backend of 1 attribute

Attribute code “35_mm_cameralens_equivalent” is invalid. Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.

 

How can we solve this?

 
Kind Regards

7 answers

Profile photo of Mall Staff 184060.00 $tone October 31, 2019
Public

Hi there,

Attribute code “35_mm_cameralens_equivalent” is invalid. Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.

Please tell me know when you got that issue? And provide me more information about context of that issue.
I will help to check further and get back you then.
Regards,
Mall.

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

Hi there,

I wanted to add something and then I received that error.

What is the type of data you want to add? Please provide me more information about that.

I also saw some duplicated values in this attibute.

Can you provide me some screenshots about that?
Meanwhile, please provide me information of your instance:

  • Admin credentials of your M2 site
  • SSH credential of your M2 site
  • Let me know the path to your M2 folder

(If the Admin and SSH credential you provided in this ticket are for the instance you reported the issue above, and these credentials remain working, kindly confirm) 

I will help to check further and get back you then.
 
Regards,
Mall.

#3
Profile photo of Mall Staff 184060.00 $tone November 1, 2019
Public

Hi Mark van Altena,

I looked it up and they it’s because the attribute code starts with a number.

So, you can manually update to remove the prefix that has number characters of the attribute code you mentioned in M2.

And the double values were also in Magento1

This indicates that it did not relate to our migration tool. Under this circumstance, you should re-update your attribute in M1 to remove the duplicated values you mentioned. 
 
Based on the information you provided, all issues come from the bad data settings in M1 database. You should consider to fix your data in M1 first and then redo data migration in all steps of our migration tool from the ground up. I know this takes you extra time, yet it would be best to ensure data integrity and avoid unexpected conflict issues due to the different working rules in M2. 
 
Regards,
Mall.

#5
Profile photo of Mark van Altena 2060.00 $tone November 1, 2019
Public

Hi Mall,
 
As far as we can see it’s only at this attribute, so we are thinking about to delete this attribute and create it again with a different attribute code. This takes a lot less time because there are also a lot of new products added to magento2 and we would lose that if we follow the migration steps.
Kind Regards
 

#6
Profile photo of ubdev Staff 98030.00 $tone November 1, 2019
Public

Hi Mark van Altena,

As far as we can see it’s only at this attribute, so we are thinking about to delete this attribute and create it again with a different attribute code.

Deleting an attribute means related attribute values of such attribute will be removed too. If you are sure that you do not necessarily keep that attribute in M2, you can follow the direction you mentioned above.
Regards,
Ubertheme team
 

#7

Please login or Register to Submit Answer

Written By

Comments