Broken links and includes
Asked by Matteo Gubellini _SoftComply_:

Hi,

I have realized that if I link or create includes of pages that reside in the same space of my page, if the page is moved or copied all links break. It looks like Confluence is trying to fing these pages in the new space.

Has anyone ever seen this? Any solution?

Thanks

Matteo


Answers:
author: Matteo Gubellini _SoftComply_
body: Hi all,

Bug confirmed, see ticket below.

[CONFCLOUD-72730](https://jira.atlassian.com/browse/CONFCLOUD-72730)

Matteo


author: Farid Jaddi
body: [@Matteo Gubellini _SoftComply_](/t5/user/viewprofilepage/user-id/641360) According to the doc (<https://support.atlassian.com/confluence-cloud/docs/insert-the-include-page-macro/>), I don't think you can:

- include a page from the space m

- move the included page into another space

without modifying the include macro.

The doc states "If the page or blog post is located in another space, add the space key and a colon in front of the page name. For example, `DOC:My page name`. The space key is case sensitive."

Have you already tried to prefix the included page with the new space key?

Concerning the links in Confluence, I tend to systematically use the tiny links (press 'k' on any page to have them). It ensures your link never gets broken.

Hope it helps,

Cheers,

Farid

comments: author: Matteo Gubellini _SoftComply_
body: Hi [@Farid Jaddi](/t5/user/viewprofilepage/user-id/4073441) ,

Yes I added the space key too, then moved it, but the results are the same.

It seems that if you use the current space, the macro automatically removes the key. I also tried to add it in the XML export, but no luck.

Thanks

Matteo


author: Farid Jaddi
body: Yes I think it's a limitation of the macro.

I tested it myself and I have the same issue:

- when the included page lives in the same space as the page including the content, the copy 'breaks' the 'include page' macro

- when the included page and the page including the content live in different space, the copy to a different space works.

I think it's worth raising a ticket to Atlassian since the documentation doesn't state this limitation and the behaviour is brittle.

Good luck mate,

Farid


author: Lucy Minato
body: [@Matteo Gubellini _SoftComply_](/t5/user/viewprofilepage/user-id/641360) I've moved many pages within a space and haven't had problems with links being broken. We are using Cloud Confluence in the cloud. So maybe you should log a support request as perhaps it's just affecting your site.

comments: author: Matteo Gubellini _SoftComply_
body: [@Lucy Minato](/t5/user/viewprofilepage/user-id/1126814) That's very strange. I've just created a new instance and it behaves the same.

1. Create new space
2. Create new page with content to be included (page 1)
3. Create new page and use the include macro with the content of the first page. (page 2)
4. Copy page 1 into another space.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/158108iF136E70D0494B5CE/image-size/large?v=v2&px=999 "image.png")


author: Lucy Minato
body: Sorry [@Matteo Gubellini _SoftComply_](/t5/user/viewprofilepage/user-id/641360) I misunderstood your problem, I didn't realise you were copying a page to another space. So can't help you ... but hopefully someone else can.


Tags: cloud

confluence-cloud