I am getting error as following in my System.log file.

Attempt to load value of nonexistent EAV attribute '42' for entity type 'Magento\Catalog\Api\Data\CategoryInterface'

I have checked this Magento 2 Attempt to load value of nonexistent EAV attribute. It is product related. but my is Category related.

How to solve this error?

  • ,can you found any solution for this error. i did like this- Actually i deleted some custom attribute using code as well as manually from backend after this i got this error in log/system.xml Commented Feb 15, 2019 at 13:15

2 Answers 2


Not to be confused with

Entity type Magento\Catalog\Api\Data\ProductInterface

This is specifically a Magento\Catalog\Api\Data\CategoryInterface issue. So we are dealing with different tables:

  • catalog_category_entity_datetime
  • catalog_category_entity_decimal
  • catalog_category_entity_int
  • catalog_category_entity_text
  • catalog_category_entity_varchar

Rather than equivalent catalog_product_entity_ *


This is an attribute that no longer exists, you should get this error when trying to load in /admin/catalog/product_attribute/edit/attribute_id/42/

This attribute no longer exists.


The following queries should reveal old references to this non-existent attribute:

SELECT * FROM catalog_category_entity_datetime WHERE attribute_id = 42;
SELECT * FROM catalog_category_entity_decimal WHERE attribute_id = 42;
SELECT * FROM catalog_category_entity_int WHERE attribute_id = 42;
SELECT * FROM catalog_category_entity_text WHERE attribute_id = 42;
SELECT * FROM catalog_category_entity_varchar WHERE attribute_id = 42;

Whichever of these tables reveal the old reference we need to delete:

DELETE FROM catalog_category_entity_<WHICHEVER> WHERE attribute_id = 42;

BAM, I hope the error no longer appears


After remove eav_attribute, you need to remove from catalog_eav_attribute Hope it will work for you.

  • ,i did both things but even this error is showing. Commented Feb 15, 2019 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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