bloomreach / docs-feedback

1 stars 0 forks source link

Changing the supertype in the CND is not enough #116

Closed matsodolphijkvk closed 1 year ago

matsodolphijkvk commented 1 year ago

Goodmorning,

I have a suggestion for article: https://xmdocumentation.bloomreach.com/library/concepts/content-repository/configure-document-versioning.html

We added the audittrace supertype in the CND. After the change we ran into bootstrapping problems in our dev/test/acc/prod environments. Turns out that just adding the supertype in the CND is not enough. The changes also needed to be made in the namespace yaml's of the documents. This made perfect sense in hindsight but it can't hurt mentioning this in the documentation as well. And it might prevent others from running into the same issues as us.

Kind regards,

Mats

nvankampenhout commented 1 year ago

Thanks for the feedback @matsodolphijkvk ! I'll update the documentation asap.

nvankampenhout commented 1 year ago

I wasn't able to reproduce the issue with a plain vanilla archetype project but I can imagine it depends on the specific bootstrap data of a project.

I added a note at the bottom of https://xmdocumentation.bloomreach.com/library/concepts/content-repository/configure-document-versioning.html.

matsodolphijkvk commented 1 year ago

Goodmorning @nvankampenhout, I now think that the error was caused by adding the supertype in the CND. After a deploy on an existing environment we got this bootstrap error:

25.01.2023 15:51:16 [main] ERROR [org.onehippo.cm.engine.ConfigurationServiceImpl.applyConfig():978] Failed to apply config javax.jcr.RepositoryException: The following node type change contains non-trivial changes.Up until now only trivial changes are supported. (see javadoc for org.apache.jackrabbit.spi.commons.nodetype.NodeTypeDefDiff): org.hippoecm.repository.jackrabbit.HippoNodeTypeRegistry$CustomNodeTypeDefDiff[ nodeTypeName={http://www.kvkwebsite.com/kvkwebsite/nt/1.0}basedocument, mixinFlagDiff=NONE, supertypesDiff=MAJOR, propertyDifferences=[ ], childNodeDifferences=[ ] ] I've omitted the rest of the stacktrace. The bootstrapping process halted after this error and new content and config was missing from the environment. Perhaps this makes more sense than the missing supertype in the bootstrap yaml.

Kind regards,

Mats

nvankampenhout commented 1 year ago

Thanks @matsodolphijkvk , I made the note a little bit more explicit. I suspect it's very project-dependent whether someone will run into issues or not so I kept the note very generic but it should at least make people aware.