Custom node types file issues

Jackrabbit aggregates all declared node types into a single file called custom_nodetype.xml. As explained in File system, the custom_nodetypes.xml file can exist on the filesystem or in a database.

The custom_nodetypes file can always be regenerated by:

  1. Shutting down your Magnolia instance

  2. Deleting or renaming the existing file

  3. Starting it up again

Troubleshooting

NoSuchNodeTypeException: This exception means the node type was not aggregated into the file. Check to see if it’s declared correctly. Did you use CND format or XML format? Check the startup log to be sure the custom_nodetype.xml file was read without errors.

Examples of custom node type registrations in the logs
2024-05-07 07:23:56,779 INFO  info.magnolia.jackrabbit.ProviderImpl : Custom node types registered using /mgnl-nodetypes/magnolia-dam-nodetypes.cnd
2024-05-07 07:23:57,200 INFO  info.magnolia.jackrabbit.ProviderImpl : Custom node types registered using /mgnl-nodetypes/tasks-nodetypes.xml

You can always try to reregister the node types manually by running the Groovy script below.

Groovy workaround
import info.magnolia.objectfactory.Components;
import info.magnolia.repository.RepositoryManager;

nodeTypeFilePath = "/mgnl-nodetypes/my-custom-nodetypes.cnd";

repositoryManager = Components.getComponent(RepositoryManager.class);
repositoryProvider = repositoryManager.getRepositoryProvider("magnolia");
repositoryProvider.registerNodeTypes(nodeTypeFilePath);

println "Custom node types registered using " + nodeTypeFilePath
Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the DX Core docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules
6.3 beta
X

Magnolia 6.3 beta

Magnolia 6.3 is in beta. We are updating docs based on development and feedback. Consider the 6.3 docs currently in a state of progress and not final.

We are working on some 6.3-beta known issues during this phase.