The error "a page with this name already exists in this space" displays when renaming a page title
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
Summary
When trying to rename a page in Confluence, the error message "a page with this name already exists in this space" is thrown, even though there isn't a visible page in the specific space with the new page name.
Environment
6.15.6
Diagnosis
Database
If the page rename has failed with the error message mentioned above, check the database for an already existing page with the title that we're trying to use:
SELECT C.CONTENTID, C.TITLE, C.CONTENTTYPE, C.CONTENT_STATUS, S.SPACENAME FROM CONTENT C JOIN SPACES S
ON C.SPACEID = S.SPACEID
WHERE C.TITLE = 'NameOfThePage';
Please be sure to replace the NameOfThePage parameter with the exact title, including casing, of the page title that you are trying to use.
Please note that it might be necessary to adapt the query above to your database's syntax.
If the query above returns an entry in the same space that the action of the page rename is taking place, it means that this operation won't be allowed as there's already a page with the title.
Restricted Pages
If the query above returns a record while a search of the page from the UI returns nothing, then it's possible that the page is restricted so that only certain users can see it. In this case, ask for a Confluence administrator to see if this is the case by navigating to Space Tools > Permissions > Restricted Pages.
Cause
The "a page with this name already exists in this space" error message is thrown when an existing page in the space with the same title already exists. When attempting to rename a page, Confluence will search for all the pages in that space, including restricted ones that the user might not see. This restricted page will prevent the renaming of the new one, triggering the error message.
Solution
There are two alternatives to fix this problem, and both involve renaming either the new or the existing page:
- Choose a new name for the new page, so that it doesn't conflict with the existing page's title, or
- Ask for an administrator to remove the restrictions of the old page and rename it, so that the title being used can be applied to the new page.