We've been using Confluence for a month on the Starter Licence, version 6.11 (self-hosted server). I clicked on the link for the Draft page for the first time and got an error instead of the page. The key part of the error states:
The body of this ContentEntityObject ('Redacted Page Name') was 'BodyType:XHTML' but was expected to be 'BodyType:RAW'.
The page referenced does not exist or has been renamed.
Below is the full error, Any assistance in gaining access to our drafts page would be greatly appreciated.
FULL TEXT OF ERROR
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 ('Redacted Page Name') 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 ('Redacted Page Name') was 'BodyType:XHTML' but was expected to be 'BodyType:RAW'
at com.atlassian.confluence.core.ContentEntityObject.getBodyContent(ContentEntityObject.java:290)
The issue with the trial installation of the Questions for Confluence add-in breaking the Drafts functionality was resolved by Atlassian support. This is a back end solution using SQL:
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'); update content set content_status = 'deleted' where contentid in (select c.contentid from content c where pluginkey='com.atlassian.confluence.plugins.confluence-questions:question-draft');
Thanks to all who helped me through this!
One method to fix the issue from the UI is to delete all the questions found at
http://<confluence-base-url>/questions
When the question is being deleted, all the comments and drafts related to that question will also be deleted.
This may be an easier for those who are evaluating and only has a few questions added and also don't need to stop Confluence for database updates.
Can refer to https://jira.atlassian.com/browse/CONFSERVER-55067 for more background.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joe,
Did you have Confluence Questions installed at one point? It appears that could cause the issue:
Workaround options
First option: Disabling collaborative editing, user should be able to navigate to drafts page normally.
Second option: Re-enabling question plugin then clear drafts.
Let me know if you have any questions!
Regards,
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shannon,
Thanks so much for your reply. We had Questions for Confluence installed under a trial licence, and subsequently uninstalled the add-on. I disabled the Confluence Collaborative Editor Plugin, but the error remained.
We have a SQL database storing the data for Confluence over here and I can see the record in the dbo.CONTENT table that contains the reference to the entry causing the error message. Can I delete this record -- or is there a SQL command I can run -- to fix this issue via the data layer? Barring that, is there a way to obtain a second trial licence (the original expired) so I can re-install Questions for Confluence, delete the drafts, and then remove the plugin? (That way I'd be able to retain both drafts and Collaborative Editing.)
Any further assistance you could provide would be greatly appreciated.
Cheers,
Joe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joe,
There's a 3rd option we're exploring regarding removing relevant entries in the database. We haven't yet confirmed the exact deletion query but the following will get you a list of entries related to Confluence Questions:
select * from content inner join bodycontent on content.contentid = bodycontent.contentid where content.contenttype = 'CUSTOM' AND content.pluginkey = 'com.atlassian.confluence.plugins.confluence-questions:answer-draft';
In the meantime, you could review this article for information on clearing stale drafts, and perhaps can get it to work for your instance?
Keep an eye on the bug ticket as I've asked for an update there about the query that will help clear CQ drafts.
Regards,
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shannon,
The needed to change the pluginkey for your query to
dbo.CONTENT.PLUGINKEY = 'com.atlassian.confluence.plugins.confluence-questions:question-draft'
as the offending SQL entry is a question-draft, not an answer-draft.
I tried a few things, but was reluctant to run the entire series of deletes you provided without knowing the Confluence data structure better and understanding what the ramifications of running all those deletes might be.
Does Atlassian have a data schema diagram/notes it can provide? If not, I will have to wait for the bug fix.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joe,
Thank you for bringing that up - I was copying the query from one of the comments on the bug that we were working with in regards to a 3rd workaround. I had not modified it from it's original version.
Here is some information on the Confluence data model that you may find useful.
If I were you, I would create a staging instance, test the fix there, and if that works, then you could apply the fix to your production environment. You'll still want to make sure to have a backup that you can fall back on in case there's an issue.
Otherwise, I've left a comment internally on the bug ticket asking if we have any updates on a verified SQL query that would accomplish the same thing.
Regards,
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shannon,
Thank you for the data model info. Unfortunately, a staging environment is a cart and horse problem for me. We are running Confluence with an initial group of 10 users. If this group finds value in the product (and I believe the value is immense) we may expand to 50 people in the next iteration. However, no staging environment will be provided by my firm until we decide to go beyond the current use population for Confluence.
If installing a second trial of Questions for Confluence (Atlassian would need to provide this), clearing out the drafts, and uninstalling the trial would work, then I am still willing to try that. Otherwise I will have to wait for the bug fix and hope that my users are not too inconvenienced.
Thanks so much for all your help on this!
Joe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joe,
It's possible to get an evaluation license for both Confluence and Confluence Questions if you need to temporarily set up your test instance. That shouldn't be any problem at all.
We always recommend that any database modifications be tested first on a staging instance prior proceeding. Even if a specific query is proven to work on Confluence, you can never truly know how your instance will respond to the change.
Direct database modification is always recommended only as a last resort, per our Support Offerings:
SQL QUERIES
Modifying data
Atlassian does not support customers performing direct data manipulation of application databases via queries such as INSERT, UPDATE or DELETE, as they can easily lead to data integrity problems. If Atlassian encounters manipulation or customizations at this level, we may ask customers to restore data from their last known working state, or to engage an Expert to help recover their instance to a supportable state. If you are confident your UPDATE or INSERT is safe and your change management system is reliable, refer to the specific product's database documentation.
I would recommend in this case that you either:
I have reached out to the devs on this bug in question to see if they have any updates to offer on the deletion query, but your more immediate resolution would be to re-enable Questions.
Regards,
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shannon,
I tried the following:
Thanks,
Joe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Joe. The 2nd trial license was for your production instance, correct? You are currently still not able to build a staging instance?
We really would need to see your logs as well to know why the other workarounds aren't working out for you. I'm creating a support ticket now for you so you can send those over to us.
Check your email in a bit and you should have the ticket number.
Regards,
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shannon,
Thanks so much for creating the ticket. I have uploaded our logs to it and added information on a new issue: Collaborative Editing stops post creation.
From Jira ticket:
In addition to the two existing workarounds having no affect on my inability to use the Confluence Drafts function, I can no longer use Collaborative editing. When I turn Collaborative editing on, we can no longer create new posts in Confluence. Upon trying to create a post, the system hangs indefinitely and creates a draft instead. The draft that is created hangs if trying to click on the "Resume" link.
Much appreciated,
Joe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Joe!
Looks like Manuel will be helping you out now as he's received your logs.
Once the issue is resolved, please feel free to come here and update us in case other users have this problem in the future.
Regards,
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The issue with the trial installation of the Questions for Confluence add-in breaking the Drafts functionality was resolved by Atlassian support. This is a back end solution using SQL:
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'); update content set content_status = 'deleted' where contentid in (select c.contentid from content c where pluginkey='com.atlassian.confluence.plugins.confluence-questions:question-draft');
Thanks to all who helped me through this!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.