Details
-
Bug
-
Resolution: Fixed
-
Major
-
4.2-milestone-3
-
None
-
Unit
-
N/A
-
N/A
-
Description
Right now XWIKI-8250 hid the issue under the carpet by having a special "if" in getXDOM() but this is not the best way:
if (StringUtils.isEmpty(getContent())) { LOGGER.debug("Syntax [{}] cannot handle empty input. Returning empty XDOM.", getSyntax()); return new XDOM(Collections.<Block>emptyList()); }
So when you have XHTML 1.0 as the default syntax, it seems to work when creating a new page but you have a huge stack trace in the console because everytime the title is rendered it calls XWikiDocument.getDefaultEditMode() which in turn calls getXDOM() which tries to parse the content to find include macros. Reason: "for all document included check if one of them has an EditModeClass object attached to it, or a SheetClass object (deprecated since 3.1M2) attached to it. If so then the edit mode is inline.".
It's better to add support for empty content in the XHTML parser and remove this "if" in getXDOM().
Attachments
Issue Links
- is related to
-
XWIKI-8250 Can't create new page = problem with XHTML support in XWIKI 4.2-MILESTONE-3
- Closed