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

Confluence Questions drafts cannot be edited or discarded

    XMLWordPrintable

Details

    Description

      Summary

      Drafts created by Confluence questions, which appear under User Profile > Drafts, cannot be discarded or edited.

      Environment

      • Confluence 6.2.x (Likely any version)
      • Confluence Questions

      Steps to Reproduce

      1. Install Confluence Questions
      2. Create a question
      3. Select a space from "Ask in a space"
      4. Enter a question title, description, and select a topic
      5. Before clicking save, a draft will appear in User Profile > Drafts

      There appears to be a new draft created each time these steps are repeated.

      It should be noted that during repro testing, it sometimes took a minute or two for the drafts to appear.

      Expected Results

      • After clicking Discard on the draft in User Profile > Drafts, the draft is discarded.
      • After clicking Resume on the draft in User Profile > Drafts, the draft is Editable.

      Actual Results

      Clicking Discard or Resume results in a Page Not Found error displayed in the browser.

      The below exception is thrown in the browser console log:

      {statusCode: 400, data: {authorized: true, valid: false, errors: [{message: {,…}}], successful: false},…}
      data
      :
      {authorized: true, valid: false, errors: [{message: {,…}}], successful: false}
      message
      :
      "Draft deletion is not supported for type: com.atlassian.confluence.plugins.confluence-questions:answer-draft. It must be a PAGE or BLOGPOST."
      statusCode
      :
      400
      

      Workaround

      A temporary workaround is to change the draft status from the database.

      1. Find the content ID of the drafts.
        • It can be found by hovering the cursor over the draft in Confluence and then finding the draftID from the URL.
          Please take a backup of Confluence database before running the following command.
      2. Update <content id> in the following SQL query by substituting the draftID from the above step.
        update content set content_status = 'deleted' where contentid = <content id>;
        
      3. After the above step, we have to refresh cache.
      4. In Confluence, navigate to General Configuration > Cache Management
      5. Look for Content Objects and select Flush

      Alternatively, it is possible to locate all the drafts that fall into this state with the SQL query below:

      select * from content where pluginkey='com.atlassian.confluence.plugins.confluence-questions:answer-draft' and content_status='draft';
      

      Attachments

        Issue Links

          Activity

            People

              qpham@atlassian.com Quan Pham
              jwyllys Justin W.
              Votes:
              28 Vote for this issue
              Watchers:
              42 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: