-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
4.4.5, 4.5.3
-
None
When adding a component whose dialog has an editCode control with useCodeHighlighter set to true (or not set, since true is the default in this case), a NullPointerException is thrown. Editing an existing component works fine.
To reproduce: on demo, change STK's stkHTML dialog so that its editHTML control is of type editCode (it's shipped as "edit", which is not impacted by this bug). Try to add a component of type "HTML" to a page. Boom.
I was able to reproduce this on 4.4.5 (on our docu site) and 4.5.3 (on the demo site)
Exception as thrown in 4.4.5:
java.lang.NullPointerException info.magnolia.cms.gui.dialog.DialogEditCode.drawEditorWithSyntaxHighligher(DialogEditCode.java:153) info.magnolia.cms.gui.dialog.DialogEditCode.drawHtml(DialogEditCode.java:133) info.magnolia.cms.gui.dialog.DialogControlImpl.drawSubs(DialogControlImpl.java:321)
Workarounds:
- don't use editCode
- set useCodeHighlighter to false (which essentially boils down to the same)
Diagnostic:
As far as I can tell, the bug is happening in DialogEditCode#drawEditorWithSyntaxHighligher, where we call getStorageNode(), which doesn't exist yet when creating a new component. (perhaps a side-effect of some of the content api changes in 4.3 ?)