Details
-
Bug
-
Resolution: Fixed
-
Major
-
7.4
-
None
-
Unknown
-
N/A
-
N/A
-
Description
The issue is in XWikiDocument.getXDOM() which does this:
@Override public XDOM getXDOM() { if (this.xdomCache == null) { try { this.xdomCache = parseContent(getContent()); } catch (XWikiException e) { if (StringUtils.isEmpty(getContent())) { LOGGER.debug("Syntax [{}] cannot handle empty input. Returning empty XDOM.", getSyntax()); return new XDOM(Collections.<Block>emptyList()); } LOGGER.error("Failed to parse document content to XDOM", e); } } return this.xdomCache.clone(); }
So if there's an error generated by the parser this.xdomCache is null and this.xdomCache.clone() fails with a NPE.
Attachments
Issue Links
- depends on
-
XRENDERING-441 Introduce a component to generate error blocks
- Closed
- is related to
-
XWIKI-13303 Disable editing XHTML 1.0 content in WYSIWYG editor
- Closed