Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-12013

Error page when visiting drafts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 2.9
    • 2.8
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              matt@atlassian.com Matt Ryall
              matt@atlassian.com Matt Ryall
              Votes:
              5 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: