Space XML exports from Confluence Cloud which have Space templates that contain 'full-width' template properties will cause Space imports into Confluence Server/DC to break, possibly causing a partial import.
- Space export from Confluence Cloud, which contains templates that have 'full-width' TemplateProperty classes.
- Tested in Confluence Server/DC v7.19.1, but could be any current version of Confluence Server/Data Center (7+)
- In Confluence Cloud, create a full-width Space template. Create a page with this template and save.
- Export the Confluence Cloud Space as XML, full export.
- In Confluence Server/DC, restore this space into your on-prem deployment.
The space imports without issue.
The importer fails after the 'TemplateProperty' XML is read with the following error in the application logs:
- Export the Confluence Cloud export.
- Uncompress the export .zip.
- Create a quick backup of entities.xml.
- Edit the entities.xml file and remove all <OBJECT> and <COLLECTION> XML blocks that use class="TemplateProperty". For instance, this whole block should be removed as it pertains to all data within it which uses class="TemplateProperty" within the scope of the <OBJECT> and </OBJECT> tags:
- Once all of these <OBJECT> blocks pertaining to class="TemplateProperty" have been removed, save the entities.xml.
- Zip up the whole content of the uncompressed folder into a zip. Be sure to make sure that the contents are not added into a top-level folder when compressing. i.e. entities.xml and exportDescriptor.properties need to be on the root level of the zip.
- <OPTIONAL> If you have already imported this space once and it failed midway through, you can use After a failed space import, it's not possible to re-import because of leftover space data KB to delete this space from the DB. Be sure to shutdown Confluence and take a backup of the DB before updating the DB!
- Import the Space zip into your Confluence DC instance.
- Setting the 'full-width' back to 'default' does not seem to work for Space templates, runs across the same error on the importer.
- After running the workaround and importing the Space into Confluence Server/DC, pages that used the Space template will retain the user-generated formatting, but not the Space template formatting, so you will need to manually fix this in the editor.
- For the workaround, no user-created data is altered, we are simply removing the properties for the Space template which have the unsupported values, the data will remain. For templates that do NOT use full-width will import as normal, assuming that the class="TemplateProperty" XML doesn't exist for that template in the entities.xml.