How to delete document type created under the configuration tab in the cms?

1,471 views
Skip to first unread message

computerde...@gmail.com

unread,
Sep 12, 2013, 3:28:35 AM9/12/13
to hippo-c...@googlegroups.com
Hi,

Question 1:

I would like to know how to delete document type under the configuration tab. 

These can be deleted under hippo:namespaces in the console under myhippoproject, but there are corresponding document types under jcr:system/jcr:nodetypes which cannot be deleted because they are protected. 

The problem is, even if the document types are deleted under hippo:namespaces through the console, since they continue to exist under jcr:system:/jcr:nodetypes, a document type with the same name cannot be created.  

Question 2:

Another question I have is, if a document type is created by inheriting a document type, is there a way to change the document type that is being inherited? 

For example, I created a new document type called centraldocument inheriting from basedocument. 

I would like to change centraldocument to inherit from defaultdocument instead. 

Since I cannot delete centraldocument, is there another way to change what centraldocument inherits from? 

Since the inheritance relationship also exists in the entries under jcr:system/jcr:nodetypes, this cannot be changed under jcr:system since the node is protected.

Thanks in advance.

Eric Nguyen personal

unread,
Feb 26, 2015, 10:30:12 PM2/26/15
to hippo-c...@googlegroups.com, computerde...@gmail.com
I have the same need

Mathijs den Burger

unread,
Feb 27, 2015, 4:47:08 AM2/27/15
to hippo-c...@googlegroups.com, computerde...@gmail.com
Hi,

Deleting document types in the Hippo CMS UI is not supported. The only way to delete document types is via the console. Make sure to also delete all instances of that document type, e.g. via a Groovy script [1].

AFAIK it's not possible to delete JCR node types.

Changing the supertype of a node is possible though. In Hippo 7.9 this is possible in the console (the supertype property of a node is editable). You can also do it automated with, for example, a Groovy script.

hope this helps,
Mathijs



--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at http://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.

Eric Nguyen personal

unread,
Mar 3, 2015, 10:30:55 PM3/3/15
to hippo-c...@googlegroups.com, computerde...@gmail.com
Hi Mathijs,

I've checked out your link but it seems rather complicated.
How can I remove a document type I created by accidents?
Would this be enough: in CMS Console, delete the node under hippo:namespaces >> myproject?
Anything else I need to clean up?

Mathijs den Burger

unread,
Mar 4, 2015, 4:19:29 AM3/4/15
to hippo-c...@googlegroups.com, computerde...@gmail.com
Hi Eric,

As long as you haven't created any documents with your document type you can just delete the node  /hippo:namespaces/myproject/documenttypecreatedbyaccident. And it sounds like you want to 'fix' this locally during development, so "console hacking" like this is fine then. Only if you want to delete a document type on production, where you can potentially have many documents of that type created by end users, you should take more care.

hope this helps,
Mathijs

Jeroen Reijn

unread,
Mar 4, 2015, 7:22:31 AM3/4/15
to hippo-c...@googlegroups.com, computerde...@gmail.com
If it's only on your local environment you can probably just remove if from your hippoecm-extensions.xml file and remove the entry from the [yourproject].cnd file.
Jeroen Reijn
Hippo

Amsterdam office - Oosteinde 11, 1017 WT Amsterdam
Boston office - 745 Atlantic Ave, Eight Floor, Boston MA 02111, United states of America.

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

http://blog.jeroenreijn.com | @jreijn | http://about.me/jeroenreijn

Eric Nguyen personal

unread,
Mar 4, 2015, 9:02:25 PM3/4/15
to hippo-c...@googlegroups.com, computerde...@gmail.com
Hi Joeren and Mathijs,

Noted on the hippodcm-extensions.xml and the cnd file.

Yes, this is my development environment.

1 question here: I have already created some  documents for the document type I want to remove.
Can I simply remove those documents?

Eric Nguyen personal

unread,
Mar 5, 2015, 2:54:21 AM3/5/15
to hippo-c...@googlegroups.com, computerde...@gmail.com
I have done the following:
  1. Removed the nodes under hippo:namespaces >> myproject in CMS Console
  2. Remove the entries in the CND file
  3. The document types I want to delete here are not in hippoecm-extensions.xml
  4. Deleted the bean Java classes in under site/

The deleted document types do not show up in the CMS site anymore. That's great!

However, I when I run "Generate HST Content Beans" in Essentials site, the bean classes are generated again!



There must be more cleaning up required, what is it?

Tobias Jeger

unread,
Mar 5, 2015, 3:49:18 AM3/5/15
to hippo-c...@googlegroups.com
Hi Eric,

did you bootstrap a fresh, clean repository after removing the undesired document types, but before running the beanwriter?
I'd expect that to help.

cheers

Tobi

Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 101 Main Street, Cambridge, MA 02142


US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466

Eric Nguyen personal

unread,
Mar 5, 2015, 4:38:41 AM3/5/15
to hippo-c...@googlegroups.com
How to bootstrap a fresh, clean repository Tobi?

Nic

unread,
May 14, 2017, 5:16:31 AM5/14/17
to Hippo Community
Hello,

I am having the exact same issue.

I have cleaned everything as explained here but as Eric said when I use the HST bean generator the classes appear back again...

I know Tobi said to  bootstrap a fresh, clean repository  but I do not know how to...

I tried to do mvn clean verify and cargo run but did not help..


How do I bootstrap a fresh, clean repository ??

Best Regards

Nic

Nic

unread,
May 14, 2017, 5:38:17 AM5/14/17
to Hippo Community
Ok I will answer to my question :D

Digging in the doc i found you can run commands to force the boostrapping with Cargo:

 mvn -Pcargo.run -Drepo.bootstrap=true

Thanks

Jasper Floor

unread,
May 15, 2017, 5:55:29 AM5/15/17
to Hippo Community
To start a clean repository you need to delete the storage. If you don't specify a storage location a clean build should do it. 

To post to this group, send email to hippo-community@googlegroups.com

RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.

Nic

unread,
May 15, 2017, 6:19:24 AM5/15/17
to Hippo Community
Hello

I have reopened this one because yesterday the problem appeared again.

When I rebuild the project, the old jcr nodetype reappeared under jcr nodetypes on my CMS Console project.

There must be a way to completely remove a created node. In my case  I made a mistake naming the  node and I wanted to rename it. All actions are denied as those nodes are protected...

As said I have followed what was written on this post deleting the entries on the 2 files mentioned here following the steps:

    1. Removed the nodes under hippo:namespaces >> myproject in CMS Console
    2. Remove the entries in the CND file
    1. Removing the entriest in hippoecm-extensions.xml
    1. Deleted the bean Java classes in under site/
      I have also tried to follow Tobi's suggestion 
      to re-lunch the fresh and clean bootstrap  with 

       mvn -Pcargo.run -Drepo.bootstrap=true

      Obviously some other thing is need. Would be nice to have a clear list of steps to follow in order to delete a jcr nodetype created by mistake.

      Thanks and sorry for reopening this.

      Best Regards

      Nic

      unread,
      May 15, 2017, 6:28:58 AM5/15/17
      to Hippo Community
      Hello,

      Thank you very much for this.

      As you can see you are right my findings did not fix the problem as yesterday happened again.

      Apologise for my ignorance but how do i delete the storage? 

      So basically I have to follow the steps that are specified here and then (before using the Bean Writing tool) I have to run 

      mvn verify
      mvn -Pcargo.run (instead of mvn -Pcargo.run -Drepo.path=storage) ??

      Is this command not useful then?
       mvn -Pcargo.run -Drepo.bootstrap=true

      Could you please tell me what command should I use in order to clean the nodestype?

      Thank you very much for you help :)

      Best Regards

      Nic

      Marijan Milicevic

      unread,
      May 15, 2017, 6:48:39 AM5/15/17
      to hippo-c...@googlegroups.com
      Hi,

      On Mon, May 15, 2017 at 12:28 PM, Nic <nicola...@gmail.com> wrote:
      Hello,

      Thank you very much for this.

      As you can see you are right my findings did not fix the problem as yesterday happened again.

      Apologise for my ignorance but how do i delete the storage? 

      So basically I have to follow the steps that are specified here and then (before using the Bean Writing tool) I have to run 

      mvn verify
      mvn -Pcargo.run (instead of mvn -Pcargo.run -Drepo.path=storage) ??

      Is this command not useful then?
       mvn -Pcargo.run -Drepo.bootstrap=true

      Could you please tell me what command should I use in order to clean the nodestype?

      Thank you very much for you help :)

      Best Regards

      Nic


      you use -Drepo.bootstrap=true when you want to keep your existing storage and reload changed items. 
      Now, normally, you will do this on a production/acceptance server to update configuration with new developed functionality.
      In a dev environment you normally just delete storage directory, which means repository will be re-indexed from scratch, so above flag doesn't make sense in that case. 
      So, just delete your repository directory or use  -Drepo.path=SOME_NEW_STORAGE_PATH to create new storage directory. This way you can still switch to old one ( -Drepo.path=storage) if you need it for some reason,
      cheers
      marijan


       
      To post to this group, send email to hippo-community@googlegroups.com

      RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
      ---
      You received this message because you are subscribed to the Google Groups "Hippo Community" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.

      Nic

      unread,
      May 15, 2017, 6:59:29 AM5/15/17
      to Hippo Community
      Hello marijan,

      You are my hero. Thanks so much for explaining and tonight I will try it to see if that works and I will let you know (I will also try to put all those steps together so if someone else needs them will be easier to find them )

      Thanks again 

      Nic

      Nic

      unread,
      May 15, 2017, 4:49:53 PM5/15/17
      to Hippo Community
      Hello marijan,

      I deleted  the folder storage and tried to do a mvn clean verify. After that I tried to re run with  mvn -Pcargo.run -Drepo.path=storage

      but something went horribly wrong. Basically cannot find anymore any jcr nodetype.  I do not understand because I have removed
      on the nodetype I misspelled so I was expecting that when rebuild the others would repopulate the jcr nodetype back.

      It is not a problem for me restarting the project but Iam really concerned that if for any reason i will get wrong the name of a document type I will have to decide between leave an unused document in the repository or chuck in the bin the whole project and restart it..

      I have uploaded a screenshot of what is happening..

      Best Regards

      Nic
      broken project.png

      Marijan Milicevic

      unread,
      May 16, 2017, 5:55:54 AM5/16/17
      to hippo-c...@googlegroups.com
      On Mon, May 15, 2017 at 10:49 PM, Nic <nicola...@gmail.com> wrote:
      Hello marijan,

      I deleted  the folder storage and tried to do a mvn clean verify. After that I tried to re run with  mvn -Pcargo.run -Drepo.path=storage

      but something went horribly wrong. Basically cannot find anymore any jcr nodetype.  I do not understand because I have removed
      on the nodetype I misspelled so I was expecting that when rebuild the others would repopulate the jcr nodetype back.

      It is not a problem for me restarting the project but Iam really concerned that if for any reason i will get wrong the name of a document type I will have to decide between leave an unused document in the repository or chuck in the bin the whole project and restart it..

      I have uploaded a screenshot of what is happening..


      those errors are java related, so, check if your pom dependencies/package imports are ok.

      cheers
      marijan
       
      To post to this group, send email to hippo-community@googlegroups.com

      RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
      ---
      You received this message because you are subscribed to the Google Groups "Hippo Community" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.

      Marijan Milicevic

      unread,
      May 16, 2017, 5:58:09 AM5/16/17
      to hippo-c...@googlegroups.com
      On Tue, May 16, 2017 at 11:55 AM, Marijan Milicevic <marijan....@bloomreach.com> wrote:
      On Mon, May 15, 2017 at 10:49 PM, Nic <nicola...@gmail.com> wrote:
      Hello marijan,

      I deleted  the folder storage and tried to do a mvn clean verify. After that I tried to re run with  mvn -Pcargo.run -Drepo.path=storage

      but something went horribly wrong. Basically cannot find anymore any jcr nodetype.  I do not understand because I have removed
      on the nodetype I misspelled so I was expecting that when rebuild the others would repopulate the jcr nodetype back.

      It is not a problem for me restarting the project but Iam really concerned that if for any reason i will get wrong the name of a document type I will have to decide between leave an unused document in the repository or chuck in the bin the whole project and restart it..

      I have uploaded a screenshot of what is happening..


      those errors are java related, so, check if your pom dependencies/package imports are ok.

      forgot to say: BaseDocument class is missing, if you deleted it, you should restore it,
      it should look something like this:
      @Node(jcrType="YOUR_NAMESPACE:basedocument")
      public class BaseDocument extends HippoDocument {

      }

      where YOUR_NAMESPACE is your project namespace,
      /m
      Reply all
      Reply to author
      Forward
      0 new messages