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

Linking to a page with a title of the format 0000/00/xx will cause the 'Page Information' page to break

    XMLWordPrintable

Details

    Description

      Steps to Reproduce:

      1. Create a page that starts with '0000/00/xx', where 0 is a number, and 'xx' is a string that contains at least one letter. Other examples include:
        1. 1991/07/0a
        2. 2013/10/03 - test
        3. 1892/01/broken
        4. 2015/08/02 Case 02 with problem
      2. Create a second page, and add a link to your first page.
      3. Attempt to view the Page Information of your second page. (Tools > Page Information).

      Results:
      The following stack trace is produced:

      org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getOutgoingLinks' in  class com.atlassian.confluence.pages.actions.PageInfoAction threw exception java.lang.NumberFormatException: For input string: "apples" at /pages/viewinfo.vm[line 359, column 39]
      	at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223)
      	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
      	at org.apache.velocity.runtime.parser.node.ASTReference.evaluate(ASTReference.java:470)
      	at org.apache.velocity.runtime.parser.node.ASTAndNode.evaluate(ASTAndNode.java:104)
      	at org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpression.java:62)
      	at org.apache.velocity.runtime.parser.node.ASTOrNode.evaluate(ASTOrNode.java:98)
      	at org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpression.java:62)
      	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:85)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      	at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:159)
      	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
      	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
      	at org.apache.velocity.Template.merge(Template.java:328)
      Known Good Formats

      The following examples of title do not cause the problem mentioned, and could be used as an alternative:

      1. 02/08/2015 Title
      2. 08/02/2015 Title
      3. 2015-08-02 Title
      4. Any text before a problematic date, eg "-2015/08/02 Case 02 with problem"

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ldally lachland
              Votes:
              15 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated: