Magento import error - SQLSTATE [23000]: Integrity constraint violation: 1048 Column 'attribute_id cannot be null

I have a problem uploading large csv products.

It is validated and the import says: SQLSTATE [23000]: Integrity constraint violation: 1048 Column 'attribute_id cannot be null

After that I checked the product page and they are all there, but they don't seem to be in the categories, they don't appear in the search, and even if I manually included the categories, they don't appear.

Any ideas? Really stuck!

+3


source to share


5 answers


Value is missing in "_media_attribute_id"

check the entire column and insert "88" where it is missing.



He solved my problem

+5


source


Invalid attribute_id

is associated with custom attributes.

You need to check that 1) all attribute fields referenced by your csv allow Color as an example - have been configured as attributes in Magento (Directory> Attributes> Manage Attributes) .Likewise, you need to make sure any custom the attributes that have been added and configured as needed are in your csv.

The attributes that Magento expects will ultimately depend on the_set attribute that you tell Magento to use for those products - also part of your csv. Similarly, you can manage attribute sets in Catalog> Attributes> Manage Attribute Sets



Then you need to make sure that all the values ​​of the attributes that you are trying to import that are mentioned in the csv actually show up as the values ​​for those attributes in Magento. For exmaple, if in Magento the available values ​​for the Color attribute were only red and blue - and you tried to import Yellow under that heading, it would throw the error you mentioned. Please note that they are also case sensitive. Magento will fail in blue if it expects Blue.

Products not appearing in Search would be an unrelated issue ...

In your csv, check under the heading "visibility" that you imported the value "Directory, search" - you may have imported them as "Directory" or "Not visible separately", which explains their absence (I assume that at this point they were downloaded as included or you manually enabled them before you search!)

+2


source


I had the same error. In my case, the "_media_attribute_id" field was not filled in some products.

0


source


I got the same error when I didn't customize my attribute and attribute before importing the custom element using the specified nonexistent attribute.

Edit: So creating and setting the Attribute and Attribute set in Magento dashboard resulted in Magmi not throwing this error.

0


source


I had the same problem. Then I decided with padding '88'

in the column '_media_attribute_id'

.

0


source







All Articles