Error page when visiting drafts

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: High
    • 2.9
    • Affects Version/s: 2.8
    • Component/s: None

      Since 2.8, the draft AJAX submission allows the insertion of null page IDs in the draft table. This means the following exception message is shown to some users when visiting their drafts:

      org.apache.velocity.exception.MethodInvocationException: Invocation of method 'isMergeRequired' in class $Proxy23 threw exception java.lang.RuntimeException: draft has invalid pageId: 'null' @ /users/viewmydrafts.vm[33,48]
      at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:286)
      caused by: java.lang.RuntimeException: draft has invalid pageId: 'null'
      at com.atlassian.confluence.pages.DefaultDraftManager.getAbstractPage(DefaultDraftManager.java:217)
      caused by: java.lang.NumberFormatException: For input string: "null"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)

      You can see the cause of this problem in the database with the following query:

      select count(*) from content where contenttype = 'DRAFT' and draftpageid is null;

      I'm not yet sure whether the cause of this problem is a front-end bug or not, but this data should certainly be better-validated on the backend before persisting it.

            Assignee:
            Matt Ryall
            Reporter:
            Matt Ryall
            Votes:
            5 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: