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

Confusing error message when trying to insert inline comment in macro content

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 6.13.0, 6.15.1, 8.5.16, 9.2.0
    • Macros - Jira Macros

      Issue Summary

      If you create and try to save an inline comment after highlighting the text in a Summary field contained within a Jira Issues macro or title of the Expand macro, Confluence returns the message "Could not save the comment."

      Environment

      • Tested Jira Issues macro in Confluence 9.2.0 integrated with Jira 9.12.2
      • Tested Expand macro in Confluence version 8.5.16 and 9.2.0

      Steps to Reproduce

      • Jira Issues macro
        1. Create an app link integration between Confluence and Jira.
        2. Create a page in Confluence.
        3. Add a Jira Issues macro into the page. When configuring the display of the macro, ensure that the Summary field is included.
        4. Save the page and view it in Confluence.
        5. Highlight text located within the Summary column and click on inline comment icon to add a comment.
        6. Enter comment and save.
      • Expand macro
        1. Create a page in Confluence.
        2. Add Expand macro and give a title to it.
        3. Save the page and view it in Confluence.
        4. Highlight the title of Expand macro to add a comment.
        5. Enter comment and save.

      Expected Results

      You are prevented from using inline comments on the output of a macro and get an error message stating that.

      Actual Results

      Confluence returns the message "Could not save the comment."

      HAR file shows that the following REST call returns an HTTP 500 error:

      <base-url>/rest/inlinecomments/1.0/comments
      

      Application logs show the following error:

      2019-04-18 09:52:27,093 WARN [http-nio-9613-exec-7] [plugins.inlinecomments.service.InlineCommentServiceImpl] attemptInlineCommentCreateForPage The text selection is wrong
       -- referer: <base-url>/display/MYSPACE/Test+Page | url: /conf/rest/inlinecomments/1.0/comments | traceId: 832de33c025e7082 | userName: charlie
      com.atlassian.confluence.plugins.highlight.SelectionModificationException: The text selection is wrong
      	at com.atlassian.confluence.plugins.highlight.service.SelectionValidator.validateSelection(SelectionValidator.java:65)
      

      Workaround

      None. Not being able to highlight text and add an inline comment is by design.

              Unassigned Unassigned
              sshaw@atlassian.com Steve Shaw
              Votes:
              8 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated: