-
Bug
-
Resolution: Fixed
-
High
-
5.4.3, 5.7.4, 5.8.5, 5.9.3, 6.1.2
-
62
-
Severity 2 - Major
-
10
-
NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.
Trying to import an XML backup into Confluence, we might have the below issue:
Import failed. Check your server logs for more information. com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: An invalid XML character (Unicode: 0xffff) was found in the CDATA section.
Couldn't find the specific steps to reproduce it but certain XML backups have this issue. This has including been documented here:
The entities.xml file, and can be fixed by
- Unzip the export zip file
- Run the below command on the entities.xml file:
perl -i -pe 's/\xef\xbf\xbf//g' entities.xml
- Zip up the contents, making sure the root directory has entities.xml
For Windows Users falling into the 0xFFFF problem - The Perl script and the .JAR File doesn't work for Windows, I couldn't understand the reason yet, however, I created a Power Shell script to fix it. Just run it in the Power Shell ISE or save it as a .PS file and execute it through PS. Here's the script:
- Don't forget to change the path of the yourfile entry below to have the PS script picking up the file from the correct place.
- Don't forget to change the path of the output file below to have the PS script saving the clean file in the correct place.
$yourfile = "C:\Users\atlassian\Documents\Horlle\entities.xml" $outputfile = "C:\Users\atlassian\Documents\Horlle\entities_clean.xml" get-content -path $yourfile | out-file $outputfile -encoding utf8
- is related to
-
CONFSERVER-3475 Filter Illegal characters from CDATA sections when creating backups
- Closed
- relates to
-
CONFCLOUD-38089 Unable to complete import: An invalid XML character (Unicode: 0xffff) was found in the CDATA section
- Closed
- resolves
-
MIG-81 Space migration fails due to Confluence version
- Closed
- mentioned in
-
Page Loading...