PriyaS
PriyaS

Reputation: 141

How to remove OOTB attributes from Backoffice

I need to remove Out of the box attributes from Backoffice, these attributes are defined in the multipe OOTB extensions.

Upvotes: 0

Views: 2041

Answers (1)

Arvind Kumar Avinash
Arvind Kumar Avinash

Reputation: 79075

I am not sure if you want to hide these attributes from backoffice or you want these attributes to be removed completely from the database.

If you just want to hide them, you can add the following custom property for these attributes in the items.xml:

<custom-properties>
  <property name="hiddenForUI">
      <value>Boolean.TRUE</value>
  </property>
</custom-properties> 

Please check core-items.xml for some examples.

Alternatively, you can import the following ImpEx:

INSERT_UPDATE AttributeDescriptor;qualifier[unique=true];enclosingType(code)[unique=true];hiddenForUI 
;the-attribute-to-be-hidden;the-itemtype-to-which-the-attribute-belongs;TRUE

If you want them to be removed completely from the database, you can do the following things:

  1. Identify the extensions in which they have been defined and if any of these extensions are not required, just remove them from localextensions.xml
  2. Remove these attributes from their respective items.xml

Then, you need to execute ant clean all updatesystem. However, the columns corresponding to these attributes will still persist in the database as system update does not remove/drop any table/column from the database (you can only add new tables/columns and add/update/remove the data using system update). In most of the cases, system initialization is also not a possibility. So, you are left with only one option, which is to delete the columns from the database using the SQL queries.

Upvotes: 1

Related Questions