1

I know it is possible to remove system attributes, changing them to user defined ( database table eav_attribute column “is_user_defined” ).

I wonder if this is safe ? ( for example could it be a problem for future Magento Upgrades ? )

3 Answers 3

3

Don't remove system attributes.
There is a reason you cannot remove them from the UI.
All of them have a meaning in the logic of the application so it's not safe to remove them.
If you want, you can add to the question the list of attributes you want to remove and I will tell you what the impact may be.
But one thing is clear: Do not remove system attributes

3
  • 1
    Even when deprecated or removed from code reference, they can be there as a sort of template. Alan Storm ran through some analysis of this in one of his answers, and he came to the same conclusion. Or to put it another way, Magento already causes enough headaches as is, why start chopping at the roots with a broadaxe? Commented Feb 11, 2014 at 17:22
  • 1
    It will be great if you can point to the comment ...
    – Fra
    Commented Feb 12, 2014 at 5:26
  • okay !but how to remove weight attribute from attribute set? Commented Sep 6, 2018 at 7:21
2

It is not safe to just remove them! However manipulating the is_user_defined column in eav_attribute once helped me to narrow down a huge problem which prevented me from opening any article in magento:

I installed an extension successfully but immediately after the process was finished my whole shop was down (front- and backend). I managed to successfully uninstall the extension which made the shop accessible again. However, four attributes (which were declared system attributes by that extension) remained and were used in each attribute-set. Due to false references (I guess), I wasn't able to open any article anymore leading to an error. After I while, I discovered these attributes trying to remove them from my attribute-sets. However, since they were system, I could not drag them away.

Changing the eav_attribute table helped me, so I just made them user-defined to be able to drag them away from my attribute-sets. Finally, I was able to edit my products again.

All I am saying is: It is wise to "just" make them user-defined in order to be able to detach them from your attribute-sets (to accomplish the desired result) rather than to delete them!

0

It depends on the attribute. The core code may rely on the presence of the attribute, and if that's the case, removing the attribute will cause the code to fail gracelessly.

If you're set on removing it, do a search for it in the code, using grep, ack, ag, or the like. Make sure to search for all the possible forms of the attribute in .php, .phtml, and .xml files. For example, if you're looking for an attribute called example_attribute, search for the string 'example_attribute' along with the string "ExampleAttribute" in order to catch calls to functions like getExampleAttribute and setExampleAttribute.

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.