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?
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.
I've just stumbled across this one thanks to Nathalie posting.
There's a fundamental misunderstanding here. You do not have two 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.
Consider two pages called
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.
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.
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.
That’s unusual but I will:
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.
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.