Details
-
Bug
-
Resolution: Fixed
-
High
-
2.8
-
None
Description
Since 2.8, the draft AJAX submission allows the insertion of null page IDs in the draft table. This means the following exception message is shown to some users when visiting their drafts:
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'isMergeRequired' in class $Proxy23 threw exception java.lang.RuntimeException: draft has invalid pageId: 'null' @ /users/viewmydrafts.vm[33,48]
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:286)
caused by: java.lang.RuntimeException: draft has invalid pageId: 'null'
at com.atlassian.confluence.pages.DefaultDraftManager.getAbstractPage(DefaultDraftManager.java:217)
caused by: java.lang.NumberFormatException: For input string: "null"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
You can see the cause of this problem in the database with the following query:
select count(*) from content where contenttype = 'DRAFT' and draftpageid is null;
I'm not yet sure whether the cause of this problem is a front-end bug or not, but this data should certainly be better-validated on the backend before persisting it.
Attachments
Issue Links
- is caused by
-
CONFSERVER-12144 Adding a comment to a page causes a conflict to be recorded under Preferences > Drafts
- Closed
- is duplicated by
-
CONFSERVER-12205 content-by-user macro output includes nonexistent items that cause errors when clicked
- Closed
-
CONFSERVER-14345 Calling Draft Pages in users preferences throws an exception
- Closed
- supersedes
-
CONFSERVER-11295 Draft data needs cleaning up on EAC
- Closed