Removing a content type with no associated content

cancel
Showing results for 
Search instead for 
Did you mean: 
CologneClaret
Active Member

Removing a content type with no associated content

Hello all,

I have updated our "CustomModel.xml" file (under Data Dictionary/Models) and added a new content type.

The content type has been defined having a parent cm:content.

The type name is defined e.g. as "temp:test"  and the properties as "temp:tsfield1", "temp:tsfield2" etc.

Now I have also added the properties to the "live-search-docs.get.config.xml" and "search.get.config.xml" files, along with the "share-config-custom.xml" file.

My problem here is that I have named the content type "temp:test" in the "CustomModel.xml" but in the Advanced Search section of the "share-config-custom.xml" I have referred to it as "temp:ts". I had copied from our dev server but had to change the name and changed every instance of "test" to "ts" manually rather than replace all and missed the name,

Now since restarting Tomcat I am unable to revert the "CustomModel.xml" file, even though no files have been created as type "temp:test" or "temp:ts". When I try to change the name to "temp:ts" in the "CustomModel.xml" file I get an error message (translated from German:

Could not save content: 03305533 Failed to validate model update - found deleted TYPE '{http://alfresco..../model/content/1.0}temp'

Does anybody have any suggestions on how to fix this or be able to rollback.

No files have been created using the type "temp" and I couldn't find anything under deleted files either.

Thank you :-)

1 Reply
abhinavmishra14
Advanced

Re: Removing a content type with no associated content

Do the following and see if it works:

1- Revert the model to its original state

2- Delete any content created using the content model and custom type from the repository.

3- Then deactivate the model and then delete it as you have dynamically added the model in, "Data Dictionary/Models". 

see the docs here: https://docs.alfresco.com/content-services/6.0/config/models/ 

4- Clear the model and indexes if already had some indexed content. This should cleanup the old model and its dependencies. 

5- Once done, add the new updated model.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)