Modify DocumentTypes

After some month of development. I am cleaning up my code.
To follow my own conventions I would like to change some names in document types.

So I tried to change the name of a document type from osde_40:Glossar to osde_40:glossar !
I did the changes in the exported YAML-Files and bootstraped the application with the changes.

That worked so far.

When using a document with that type in a list I get a log entry saying that the document type osde_40:Glossar is not found by the DocTypeService (?) and the bean attributes are not availiable in the template. After filtering the list by a facet and removing the filter everything works fine.

I assume I missed to change the name somewhere. Can you give me a hint ?
Is my approach for that kind of change the correct one?
Is there a better way to achieve, what I want?

Hi Thomas,
Document type names are also present in your .cnd file. Unfortunately cnd is very strict and only fields additions and type additions are changes that are backwards compatible, see [1]. So this may seems to be alright locally on clean bootstrapped data, but once you deploy on existing data there is going to be a RepositoryException.

So before looking into the dropdown issue, I’d test a deployment locally on existing storage to see how the upgrade behaves. I’m not expecting this change to take in.

Regards, Jeroen


Hi Jeroen,

I forgot to mention, that I also changed the .cnd file.

What exactly does that mean ?

Here are all steps I performed:

  1. I changed the name in the .cnd file
  2. I changed the yaml of the documentType in src/main/resources/hcm-config/namespaces/osde_40/Glossar.yaml
  3. I changed the documents, created with that documenmt-type under src/main/resources/hcm-content/content/documents/osde_40/glossar.yaml
  4. I changed the filter in the facet: src/main/resources/hcm-content/content/documents/osde_40/glossarFacets.yaml
  5. I deleted the gnerated bean-Class
  6. I deleted storage- and target folder, before starting the application

Shouldn’ that work?
I know decided to create a new document-type and deleted the other one- since I do not have a productive version yet, that is an option.

But I would like to really understand what is going on!!

This should work yes but I expect this to fail if you do NOT delete local storage, i.e. deploy on a storage with osde_40:Glossar in the cnd (and instances).

However, if you don’t have osde_40:Glossar definition nor instances in production yet, it can work.

Then you should have a look where the log entry (saying osde_40:Glossar is not found) comes from, based on what data (facets, right?).


Thanks for your response.
As I decided to create a new doctype and delete the old one-
I can not reproduce the error (I also did not commit the changes :frowning: )
But as I remember it was the `DocumentTypesService’ !

At the end for me is important, that I had the correct approach :slight_smile: