-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
7.4.0, 7.4.5, 7.4.8, 7.9.0, 7.12.0
-
6
-
Severity 3 - Minor
-
1
-
Issue Summary
Some pages for some reason lose or are created without created data associated with them.
That causes several different errors on Confluence, which we have some other bugs already explaining them like:
https://jira.atlassian.com/browse/CONFSERVER-60169
https://jira.atlassian.com/browse/CONFSERVER-59982
https://jira.atlassian.com/browse/CONFSERVER-58270
The one found by one of our customers is that when trying to do an API call for content it returns a 500 error, in case there is any page without the creation date associated, and if they try to do that for trashed items like the rest below the same happen even with pages that have status DELETED:
curl -u username:password -X GET “http://localhost:8090/rest/api/content?expand=history.lastUpdated&status=trashed”
Steps to Reproduce
- Have a page with the creationdate null on the database
- Perform an API call that will retrieve the data of that page
- API will return
{“statusCode”:500,“message”:“”,“reason”:“Internal Server Error”}
Expected Results
Return the data in an XML format
content_api.xml
Actual Results
{“statusCode”:500,“message”:“”,“reason”:“Internal Server Error”}
The below exception is thrown in the xxxxxxx.log file:
[rest.api.model.ExceptionConverter] convertServiceException No status code found for exception, converting to internal server error : -- url: /rest/api/content/<ID>/child/page | traceId: xxxxx | userName: admin java.lang.NullPointerException at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:210) at com.atlassian.confluence.api.model.content.History$HistoryBuilder.createdDate(History.java:231)
Workaround
Run the following query on the database:
SELECT * from content where creationdate is NULL and content_status != 'draft';
Either remove them manually from the page after identifying the pages or add a dummy entry for date like:
UPDATE content SET creationdate ='2021-01-01 01:01:01.001', lastmoddate = '2021-01-01 01:01:01.001' where creationdate is NULL and content_status != 'draft'
- blocks
-
CONFSERVER-58270 Confluence might show blank content or an old version of a page when an user tries to edit a page with Collaborative Editing enabled
- Closed
-
CONFSERVER-59982 Content entries with a null creationdate fails import to Cloud
- Gathering Impact
-
CONFSERVER-60169 Unable to edit page's title
- Short Term Backlog