two pages created in confluence with same name with the different links.
Asked by Kuldeep Singh:

We have created by mistake two pages in confluence with same name and with different links,

Right now the Confluence URLs is **https://\<confluence\>/display/\<space\>/\<page-name\>**   
And the share URL is **https://\<confluence\>/x/\<page-id\>**

**so, when we click on the first link it is going to the second link, How we can fix this?**


Answers:
author: Nathalie Chiva
body: Just had the problem. There is an easier workaround than the one suggested:

1) Duplicate the page you can access, just in case (you most likely will not use this duplicate, it's a safety measure)

2) Delete the page you can access

3) Search again - now you will be able to access the other page since you deleted the first.

4) Rename this other page

5) Restore the page you deleted from trash.

comments: author: Nic Brough -Adaptavist-
body: I'm afraid that won't work, but it won't do any harm. See my answer for why.


author: Nathalie Chiva
body: But it does work - I just did it.


author: Nic Brough -Adaptavist-
body: Not quite, it's just had no effect. You're working with a single page...


author: Nathalie Chiva
body: No. See my answer below.


author: Nic Brough -Adaptavist-
body: I've just stumbled across this one thanks to Nathalie posting.

There's a fundamental misunderstanding here. You do **not** have t**wo pages** with the same name.

You have **one** page with **two different URLs** you can get to it on.

Confluence does not let you have pages with the same name (title) in a single space.. What is happening is "friendly URLs". Every Confluence page is reachable over two or three urls.

* The core URL - a full, long URL that refers to the page by its database id
* A minified URL -- look at the page properties, one of them is a short URL
* A friendly URL - this only exists if Confluence can generate a friendly URL

Consider two pages called

* My dog is called Alice and likes treats
* My cats (Bob \& Charlie) like naps

The first name can be converted to a friendly name, so there are three URLs for it. The second contains control characters for URLs, so Confluence can't convert it to a friendly format, so it only has two

Note that on Cloud, the "make friendly" is a bit broken - instead of refusing to have one, it adds the ID into it to make it unique, and strips the special characters out, which makes it pretty pointless having a friendly url.

comments: author: Nathalie Chiva
body: I agree this should be the case, but in my case, for an unknown reason, I really seemed to have 2 pages with the same URL (and I still do not understand how it was possible). The problem presented as follows: I was searching for a page (let's call it page A) called "CRPT Code Ordering". I did a search, page A showed as the first result. The text snippet was showing me it was indeed the page I was looking for. But when I clicked on this search result, I was directed to another page (let's call it page B), older, with the same title, but with a different content. I tried to refine the search with date, author, but the problem was always the same: I could not reach page A even if I was previewing it in the search results, I was always directed to page B. That's when I did what I described above, and it worked.


author: Nic Brough -Adaptavist-
body: Look very closely at the urls and the titles of the pages, you're going to find they are different. It may even be spaces.


author: Nathalie Chiva
body: So how come I reached page B when clicking on a link that showed a snippet of page A? It's a genuine question, I concluded it was because they must have had same URL because I could not find another explanation.


author: Nic Brough -Adaptavist-
body: There are several macros that can do that. The important point is that Confluence simply can't have two pages with the same name in the same space. The only way to do it is to amend a page title directly in the database, and when that is done, Confluence crashes when you try to index, view or edit either of them.


author: Ismael Jimoh
body: Hi [@kuldeep](/t5/user/viewprofilepage/user-id/4572404)

That's unusual but I will:

* Backup confluence
* Rename one page first
* Save and attempt to access the other page again.

My question to you is are they on the same space? On the same child hierarchy?

You can try accessing via page I'd and confirm if both have the same I'd which shouldn't be the case as Page id should be unique for each page.

Regards.

comments: author: Ismael Jimoh
body: Looking at your link, you are potentially accessing the same page since link 2 could be the page I'd for link 1 you shared and you are not access The other page at all.


author: Kuldeep Singh
body: Hi @\[deleted\],

yeah, it is in the same space, there are two parent pages one is old and other one is new with the same name created, so when we click on the child pages of new link, then link is targeting to old page.

and some some links exist in the main page.

Thanks,


author: Ismael Jimoh
body: Can you please hover over the links on the new page and compare the page of with that of the old page? I fear that you may have copied the page and also links leading to this confusion.

It is however difficult to fully grasp what you mean while not having sample URLs to go by where I can compare.

However, as I suggested above try getting page I'd for the conflicting pages and compare them. Confluence should not allow 2 pages have the same Id.

Regards.


Tags: confluence-server

server