-
Suggestion
-
Resolution: Unresolved
-
None
-
None
Steps to Reproduce
- Create a page “Test 1”.
- Create a custom content object with the title “Test 2” and the storage format body <p><ac:link><ri:page ri:content-title="Test 1"/><ac:link-body>Test link</ac:link-body></ac:link></p>
- Rename page “Test 1” to “Test 2”
Expected Result
Custom content gets updated to link to page “Test 2”: <p><ac:link><ri:page ri:content-title="Test 2"/><ac:link-body>Test link</ac:link-body></ac:link></p>
Actual Result
ri:page element gets removed, breaking the link: <p><ac:link><ac:link-body>Test link</ac:link-body></ac:link></p>
Additional Note
It seems that when the page reference is updated, Confluence thinks that the custom content is linking to itself, because the page that it is linking to has the same title as the custom content itself.
This also happens on Server.
Impact
The issue significantly affects our current efforts to provide a migration path for Scroll Versions to Cloud via Scroll Documents.
Background
Due to the complexity of integration of Scroll Versions with Confluence Server it is not possible to migrate it to cloud as is. Therefore we, at K15t, have decided to use one of our existing Cloud apps - Scroll Documents, to be the cloud alternative for Scroll Versions.
In doing so, we have had to make substantial changes to the underlying data model of Scroll Documents. This was necessary in order to be able to support the various functionality that Scroll Versions provides.
Scroll Documents is available on both Confluence Cloud and Server providing 100% feature parity. This is partly made possible by the use of Custom Content Entity Objects to persist information. But in doing so, we have hit a roadblock due to a bug that exists both on Confluence Cloud and on Confluence Server.
Cloud
On Cloud we have a custom content module configured that looks something like this:
"modules": { "customContent": [ {{{}} "key": "document-family", "name": { "value": "Scroll Documents" }, "uiSupport": { "contentViewComponent": { "moduleKey": "k15t-docs-document-manager" }, "listViewComponent": { "moduleKey": "k15t-docs-documents-overview-page" }, "icons": { "item": { "width": 16, "height": 16, "url": "/static/assets/imgs/documents_icon_item.svg" }, "list": { "width": 24, "height": 24, "url": "/static/assets/imgs/documents_icon_sidebar.svg" } } }, "apiSupport": { "bodyType": "storage", "supportedContainerTypes": [}}{{"space"}}{{], "supportedChildTypes": [}}{{"attachment"}}{{] } } ] } |
We are then using the Create Content API to create such content.
Server
For reference, the same problem happens on Server. There we are adding a content type using something like <content-type key="document" name="Scroll Document" class="com.k15t.scroll.documents.document.DocumentInstanceContentType"/>, with the class extending com.atlassian.confluence.content.custom.BaseCustomContentType.
We are creating the custom content object using customContentManager.newPluginContentEntityObject("k15t-scroll-document-versions-for-confluence:document") and then saving it using customContentManager.saveContentEntity(cceo, null).