Environment and versions used
Latest version of tools (update: currently this is 5.2.0-SN)
Any version of Jahia
Steps to reproduce
- Create a new module
- In its
definitions.cnd, define a new node type:
<example = 'https://example.com/1.0'>
[example:myComponent] > jnt:content
- myProp (string)
- Deploy the module
- Create a site mySite with that template set
- Go to http://localhost:8080/modules/tools/definitionsBrowser.jsp and delete the ndoe type example:myComponent
- 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:
Environment and versions used
Latest version of tools (update: currently this is 5.2.0-SN)
Any version of Jahia
Steps to reproduce
definitions.cnd, define a new node type: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:
Notes: