Dear experts,
if I have accidentally created a compound Type or document Type. How do I delete or remove them them?
These are the steps I took but are they any better way of doing it?
If anyone wish to follow PLEASE REMEMBER TO BACKUP YOUR HIPPO CMS folder
Assuming I wish to delete OrangCT (Compund Type) I created accidentally and have alreadt generated the REST API. Assuming your artifactid is xxxxxx
-
Go to the HIPPO CMS folder (Assuming D:\HIPPOCMS\xxxxxx)
At the terminal start the Hippo CMS (Assumming : mvn -Pcargo.run -Drepo.path=storage) -
Login to console (Assuming localhost:8080/cms)
Remove all the Document that uses OrangCT, you will notice you cannot remove the Document Type and Compund Type. -
Login to console (Assuming localhost:8080/cms/console)
-
Expand the nodes until you reach namespace (Assumming jcr:root/hippo:namespace/xxxxxx/)
You will see the nodes you wish to delete,
right click on the target node (OrangCT) and choose delete node
check save immediately and OK -
At the terminal press Ctrl + C to end the HIPPO CMS
-
Open Java Editor (Assumming Eclipse)
create a workspace from D:\HIPPOCMS\xxxxx and call it HIPPOCMS123
Import an existing Maven Project and select the POM file from D:\HIPPOCMS\xxxxx\pom.xml -
Search for the target node name (OrangCT), Your search will files found
7.1. D:\HIPPOCMS\xxxxxx\repository-data\application\src\main\resources\hcm-config\namespaces\ xxxxxx.cnd
For OrangCT details inside a cnd files, be careful to only delete the LINE WITH OrangCT
7.2.
D:\HIPPOCMS\xxxxxx\repository-data\application\src\main\resources\hcm-content\content\documents\xxxxxx\category.yaml (Thanks @dhughes-xumak)
For OrangCT inside the YAML file, be careful to only delete the SET OF YAML related to OrangCT. (I used notepad++ with the language set to YAML)
-
Go to beans folder to view the java file (Assuming D:\HIPPOCMS\xxxxxx\site\src\main\java\org\aaaaa\xxxxxx\beans and delete the OrangCT.java )
-
Go to rest folder to view the java file (Assuming D:\HIPPOCMS\xxxxxx\site\src\main\java\org\aaaaa\xxxxxx\rest and delete the OrangCTResource.java )
-
In the terminal recompile and restart the Hippo CMS
(Assumming : mvn clean verify) to clean off and recompile
(Assumming : mvn c-Pcargo.run -Drepo.path=storage) to run the HIPPO CMS
Login to cms (Assuming localhost:8080/cms) you will see OrangCT no longer in your Content -> Document Type
Login to essential (Assuming localhost:8080/essentials)
Try to generate the BeanWriter you should see that beans are up to date.
Try to generate the manual REST API you should NOT SEE the OrangCT in the list.
I hope some expert can suggest if they are any better way to do this.
Thank you
Sola Lee