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

Internal Links not updated when renaming page with PageManager.renamePage()

Philipp Steinwender
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.
February 20, 2013

Hi!

I automatically manage pages and their titles with java code.

My pages are interlinked. I sometime have to automatically rename pages. And I also want the links to updated by confluence.

The link-update feature of confluence seems to work, but not if I update the page title from java by calling:

pageManager.renamePage(page, newTitle);

The page title gets replaced, but the links are broken, pointing to a non-existing page.

Am I doing it wrong, or is there something else to mention?

Couldn't find anything about this.

Version: Confluence 4.3

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Philipp Steinwender
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.
April 16, 2013

This was solved by atlassian support.

PageManager.rename does not trigger the stuff that updates the links.

The proper way to do that is described here: http://docs.atlassian.com/atlassian-confluence/latest/com/atlassian/confluence/core/ContentEntityManager.html#saveNewVersion(T, com.atlassian.confluence.core.Modification)

Alejandro Conde Carrillo
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.
April 16, 2013

Hi Philipp.

It was a pleasure to work with you on this case. Thanks for sharing the solution with the community.

0 votes
TylerA
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.
February 21, 2013

Serprime,

Are you trying to use the Confluence API or are you attempting to modify pages via a Java plugin? If the latter, I believe this has been filed in the wrong location, as this is under OnDemand (which does not allow for third-party plugins).

If this is a plugin you are developing, these links should provide some information to speed you along: https://developer.atlassian.com/display/CONFDEV/Accessing+Confluence+Components+from+Plugin+Modules & https://developer.atlassian.com/display/CONFDEV/Confluence+Plugin+Module+Types

If you are using the API, this link should provide the right set of URL calls and how to make them: https://developer.atlassian.com/display/CONFDEV/Confluence+XML-RPC+and+SOAP+APIs#ConfluenceXML-RPCandSOAPAPIs-v2apiRemoteAPIversion1andversion2

Does that help?

Philipp Steinwender
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.
February 24, 2013

You are right, i'm implementing a confluence pugin and try to move a page with the pageManager.

I didn't get what was onDemand and Download -- it should be correct now.

Thanks for the links, but these pages tell me how to get the sevices I'm already using. My issue is that the PageManager's renamePage does not update links to this page.

Luke Parsons June 26, 2018

me to :( 

TAGS
AUG Leaders

Atlassian Community Events