I am having an issue importing the ZIP file created by an export of user forms from this site.
I get the message "The XML file [name] could not be read"
I can provide the XML if that would help
Hi, sure I can check the export if you post the XML or zip file to Drive or Dropbox and share a download link here. Any URL you share in the forum is hidden from public view for your privacy.
Thanks Christian, here is a link to the file : hidden link
Okay thanks, I was able to download the file successfully. I extracted the XML file from the zip archive and ran it through an XML code validator. It looks like some invalid code is included in the XML file, and that is probably causing a parse error in the import process. In other words the issue here may not be an XML export bug or an XML import bug per se - it may be some unexpected data in a Form or in User Forms general configurations, causing an error during the XML parse process.
I found an invalid node name related to a User Avatar custom field of some kind. The node name 81zd2_user_avatar is included in the custom_fields node, which is included just before the end of the file. I'm still investigating but thought I would ask if this rings any bells for you. The invalid node starts at line 3669 in the XML file. Here is the full code of the invalid node 81zd2_user_avatar:
<81zd2_user_avatar>
<slug>81zd2_user_avatar</slug>
<meta_key>81zD2_user_avatar</meta_key>
<meta_type>usermeta</meta_type>
<type>textfield</type>
<name>81zD2_user_avatar</name>
<description></description>
<data>
<controlled>1</controlled>
</data>
<id>81zD2_user_avatar</id>
<post_labels>81zd2_user_avatar</post_labels>
<post_type>user</post_type>
<plugin_type>types</plugin_type>
<plugin_type_prefix></plugin_type_prefix>
</81zd2_user_avatar>
This is a problem because XML node names beginning with a digit are technically invalid and may cause parse errors during the import process. For a quick workaround I suggest you edit the exported XML file using a text editor application like SublimeText and rename that problematic node to something that begins with an alphabetical character, like abc_81zd2_user_avatar. Change both the opening and closing tags.:
<abc_81zd2_user_avatar>
<slug>81zd2_user_avatar</slug>
...
...
<plugin_type_prefix></plugin_type_prefix>
</abc_81zd2_user_avatar>
Do not change any of the other information inside the node for now, just change the node name in the opening and closing tags as shown above. Save the changes to this XML file and try to import the updated XML file once again.
1. Are you able to import successfully after renaming the invalid node?
2. Are you familiar with this specific User Avatar field? I would appreciate any general information you can share about it.
Thank you!
That's great; thanks, it worked.