cnd nodetypes Jahia 7.3 Jahia 8

Error when publishing

Question

Following exception when publishing content

javax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {}fontSize

Cause

The content was created for a node type, after which the node type was modified (properties of the node type has been removed or renamed)

Solution

As a workaround, add back the removed/modified property in definitions.cnd and make the property as hidden if it's not intended to be used.