Reputation: 1253
I have created a new attribute for a product and added that to the default attribute set. When I then click to navigate to Products > Catelog so that I can implement the attribute, I get the following error:
Attribute with attributeCode "X" does not exist.
Any suggestions on how to resolve that?
I have been following this tutorial: https://www.templatemonster.com/help/magento-2-x-create-manage-product-attributes.html
And this error occurs in step 9.
Upvotes: 0
Views: 2357
Reputation: 291
I resolved this error by clearing out the contents of var/generation. The issue comes from the attribute factory. Until it's rebuilt it doesn't know your attribute exists
Upvotes: 0
Reputation: 2325
Run the below commonds using ssh.
php bin/magento cache:clean
php bin/magento indexer:reindex
Upvotes: 2