Skip to content

Updates in the node type registry are not persisted in Jackrabbit NodeTypeManager #233

Description

@baptistegrimaud

Environment and versions used

Latest version of tools (update: currently this is 5.2.0-SN)
Any version of Jahia

Steps to reproduce

  1. Create a new module
  2. In its definitions.cnd, define a new node type:
<example = 'https://example.com/1.0'>
[example:myComponent] > jnt:content
 - myProp (string)
  1. Deploy the module
  2. Create a site mySite with that template set
  3. Go to http://localhost:8080/modules/tools/definitionsBrowser.jsp and delete the ndoe type example:myComponent
  4. In the Groovy Console (http://localhost:8080/modules/tools/groovyConsole.jsp), execute the following code:
JCRTemplate.getInstance().doExecuteWithSystemSession(null, null, new JCRCallback<Object>() {
    @Override
    public Object doInJCR(JCRSessionWrapper session) throws RepositoryException {
       def node = session.getNode("/sites/mySite").addNode("myNode", "example:myComponent")
        log.info("node={}",node.getIdentifier())
        return null;
    }
});

Current Behavior

The node is successfully added and its identifier is displayed

Desired Behavior

It should not be possible to add a node of a node type that has been deleted.
Instead of creating the node, the Groovy script should throw an exception:

javax.jcr.nodetype.NoSuchNodeTypeException: {https://example.com/1.0}myComponent

Notes:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions