Confluence Space or Site XML imported Page or Blog Creator is shown as Anonymous
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Space or Site XML imported Page or Blog Creator is show as annoymous even though they are not created by annoymous user.
Cause
It is a bug which are currently tracked here CONF-34177 - Getting issue details... STATUS
Workaround
Atlassian Support Offerings
The following approaches that involves SQL queries are beyond Atlassian Support Offerings. Please note that Atlassian does not support direct database INSERT, UPDATE or DELETE queries, as they can easily lead to data integrity problems. Atlassian will not be held liable for any errors or other unexpected events resulting from the use of the following SQL queries.
Backup your Database
Always backup your data before performing any modifications to the database.
Here is the step to find the actual creator and fix the page creator entry. Please ensure that you have backup your Confluence database before running the query below.
- Shutdown the Confluence
Find the current version of pages or blogs which are showing creator as anonymous
select contentid,contenttype,title,version,creator,prevver,spaceid from content where (contenttype='PAGE' OR contenttype='BLOG') and PREVVER is null and CREATOR is NULL;
You will get the following result from the query which shows the pages that are affected by this issue. As you can see the creator column for the particular entry is NULL. When the creator column is NULL the Confluence will display it anonymous. In this case, the title of the affected page is JIRA Knowledge Transfer
contentid contenttype title version creator prevver content_status spaceid 6884106 PAGE JIRA Knowledge Transfer 2 NULL NULL current 685445 Now we will need to find the actual creator of the page from the previous version of the pages or blog. Run the query below to list all the version for the affected pages and blogs based on their title. Please replace the <PAGE_TITLE> in the queries below with the title of the affected pages identify from the query from step 1
If there is only one affected pages based on the query from step 1, use the query below
select contentid,contenttype,title,version,creator,prevver,spaceid from content where title=<PAGE_TITLE> GROUP BY title;
If there are more than one affected pages based on the first query, use the query
select contentid,contenttype,title,version,creator,prevver,spaceid from content where title IN (<PAGE_TITLE_1>, <PAGE_TITLE_2>) GROUP BY title;
Here's an example of the query result from step 3. The current version of the pages is 2 identify with the
prevver
column which is NULL. As we can see the previous version 1 has proper creator value.contentid contenttype title version creator prevver content_status spaceid 6884105 PAGE JIRA Knowledge Transfer 1 8a88adea444f7c2101444fbe83120004 6883989 current 685445 6884106 PAGE JIRA Knowledge Transfer 2 NULL NULL current 685445 Now we will need to modify the creator column for the affected pages with the value from the previous version. Please replace the
<creator>
in the query below with thecreator value
from the previous version. Also replace the<CONTENTID>
in the query below with thecontentid
value of the current page.update content set creator=<CREATOR> where contentid=<CONTENTID>;
Here's an example of a query based on the information from step 4
update content set creator='8a88adea444f7c2101444fbe83120004' where contentid=6884106;
Restart Confluence