Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Identifying Duplicate Page Titles while merging several spaces

Andrew Jackson October 3, 2012

Hello

I am currently in the process of converging several spaces on our internally hosted Confluence and I keep hitting the 'A descendent page shares the same title of another page in the selected space.' message.

However I am unable to manually identify the offending page.

We only have a few hundred pages and not many of these have yet been moved to the new space so identifying this manually should of been easy but I cannot see a page with the same name.

My questions are;

Can you provide a SQL statement that would help identify duplicate page names across spaces so we can work through renaming them?

Are attachment names possibly causing this and if so can I again use a SQL statement to identify offending attachment names?

Please advise how best to proceed.

Thanks

3 answers

1 accepted

3 votes
Answer accepted
MatthewC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 3, 2012

First, you can have attachments of the same name in a space so they shouldn't be causing the problem.

here is a SQL query (mssql & pgsql) that should give you duplicate names between spaces

select
c.title
from content c, spaces s 
where c.contenttype='PAGE' 
and c.content_status='current'
and c.prevver is null 
and c.spaceid=s.spaceid
and s.spacekey in ('SPACEKEY1', 'SPACEKEY2')
group by c.title having count(*) > 1

Just replace your space keys for the examples in the 2nd last line. It ignores deleted pages & only checks the titles of the current version of pages.

if you want a report of all the pages, this will also work

select

c.contentid
, c.title
, c.content_status
, s.spacename
, s.spacekey

from content c, spaces s 
where c.contenttype='PAGE' 
and c.content_status='current'
and c.prevver is null 
and c.spaceid=s.spaceid
and s.spacekey in ('SPACEKEY1', 'SPACEKEY2')
order by c.title

Sorin Sbarnea (Citrix)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 12, 2014

Also, do not forget to vote/comment on https://jira.atlassian.com/browse/CONF-27598-- unless you fancy patching wiki using SQL.

0 votes
Sorin Sbarnea (Citrix)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 12, 2014

This is a bug in Confluence, vote/comment on it https://jira.atlassian.com/browse/CONF-27598

0 votes
Andrew Jackson October 21, 2012

This has now been resolved.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events