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

Disabling Questions plugin breaks drafts page

    XMLWordPrintable

Details

    Description

      Summary

      • Exception when opening drafts page after uninstalling Questions plugin

      Environment

      • Collaborative editing is ON
      • Disabling question plugin
      • Questions plugin version 2.5.5 , 2.6.6

      Steps to Reproduce

      1. Install Confluence questions plugin
      2. Create a test question
      3. Disable confluence questions plugin
      4. Navigate to profile>drafts page

      Expected Results

      Actual Results

      The below exception is thrown in the UI as attachment and below the confluence.log file:


       

      org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getBodyAsString' in class com.atlassian.confluence.content.CustomContentEntityObject threw exception java.lang.UnsupportedOperationException: The body of this ContentEntityObject \(''\) was 'BodyType:XHTML' but was expected to be 'BodyType:RAW' at /users/viewmydrafts.vm[line 47, column 29]\\     at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223\)\\ \\ caused by: java.lang.UnsupportedOperationException: The body of this ContentEntityObject \(''\) was 'BodyType:XHTML' but was expected to be 'BodyType:RAW'\\ at com.atlassian.confluence.core.ContentEntityObject.getBodyContent(ContentEntityObject.java:290\)
      

      Workaround options

      1. First option: Disabling collaborative editing, user should be able to navigate to drafts page normally.
      2. Second option: Re-enabling question plugin then clear drafts.

      Workaround via Database

      1. Shutdown Confluence.
      2. Backup database.
      3. Identify all the drafts created by Questions plugin.
        select * from content c where pluginkey='com.atlassian.confluence.plugins.confluence-questions:answer-draft'
        
      4. Change the status of all these drafts to deleted.
        update content set content_status = 'deleted' where contentid in (select c.contentid from content c where pluginkey='com.atlassian.confluence.plugins.confluence-questions:answer-draft');
        
      5. Restart Confluence.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              srezkalla@atlassian.com Sarah Rezkalla (Inactive)
              Votes:
              12 Vote for this issue
              Watchers:
              21 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: