Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 7.4
-
Fix Version/s: 8.1-milestone-1
-
Component/s: Old Core
-
Labels:None
-
Difficulty:Unknown
-
Documentation:N/A
-
Documentation in Release Notes:N/A
-
Similar issues:
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
-