0

I have imported my cats and products from Magento 1 into Magento 2. The categories show in the front end but it states that no products can be found. In the admin, the cats show, with their products.

However, on adding a new sub cat, the record appears to save but gets added onto the tree with an empty name. Loading it shows all data is blank. Trying to edit an existing (imported category) also results in the data to become blank. I noticed in the catalog_category_entity table that all the imported cats (which are showing on the front end, albeit without products showing) have an attribute_set_id of 3 but the new ones I am trying to create, or edit, end up with an attribute_set_id of 20.

---- update ---

I have taken a look at the eav_attribute_set table and can see why there is a problem. I just don't know what to do about it yet. All object types have two references, the one from the migration and default. Here are the entries for type 3 (Categories).

attribute_set_id   |   entity_type_id   | attribute_set_name 
... 
        3          |           3        |  Migration_Default
...
        20         |           3        |  Default

Any ideas on how to sort this pickle?

  • I have tried to set the default_attribute_set_id in eav_entity_types but it still (oddly) create a new on as set_id 20 and no data saves - an empty record is created. – Jon Holland Sep 4 at 10:12
1

In the end I

  1. removed the "Default" attribute sets from eav_attribute_set,
  2. set all categories to attribute_set_id 3 in catalog_category_entity and
  3. set the default category attribute to set to be 3 in eav_entity_type where it was set to 20 (and also the default attribute set for products to make sure they were added like the imported ones).

This corrected the problems with adding new categories in the admin and showed the products in the front end categories.

I had to fully clear all the caches and reindex for this to work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.