• Daniel Rodriguez
    Daniel Rodriguez, 2013/03/08 03:32

    This is a great application!  I did encounter two issues when importing a data set.  I'll describe the issues and how I resolved them in case anyone else runs into them.  FYI: I was running XE v4.3 (Tomcat7, MySQL 5.x).

    Issue 1
    I ran a DB sanity check after the import; All the imported documents showed up as having invalid parents. They all showed as "WebHome" instead of "{Application Space}.WebHome".

    Solution: Use the Batch Import Application to update the docs, mapping the parent to a column with the document name for the parent: "{Application Space}.WebHome" Update feature works like a charm.

    Issue 2
    One of my document names had a plus symbol add as the last character.  The batch import had no errors and the object displayed properly in the LiveTable BUT when I clicked on the Page Name (link), I saw an error that this page does not exist (this error happened if I had "+" or "%2b" as the last character in the URL.  I tried creating a wiki link to it in all XWiki syntaxes, using a plus symbol add or an empty space as the last character...no luck.  I connected to the DB and removed the plus symbol add from the document name and object name columns in their respective tables. It stopped showing up in the live table and still couldn't be reached my manually entering the URL.  I tried another batch import to overwrite it, choosing the "replace" option (not a great idea since doc and obj names aren't unique keys).  This resulted in an error when trying to access the page b/c there were duplicate objects with the same name.

    Solution
    I directly connected to the DB and deleted all the rows corresponding to the original document and object, in the doc table, obj table, properties table, and tables for the xClasses that the object had properties for.  I referred to the XWiki Data Model and performed queries based on doc and obj name (and full name) and doc and obj Id.  Once I got rid of all traces of the original doc and object, the new one I imported worked fine.

    I think this issue only occurred because the plus symbol was the last character.  I successfully used Admin Tools to export the page and when I opened the XML file I found that the plus had been converted to an empty space in the doc title because +'s represent empty spaces in URLs.  It would seem it's impossible to direct a browser to a URL that ends with an empty space.  So a word to the wise: make sure you don't have a plus as the last character in a page name when using this application unless you want to go into the DB and manually remove all traces of it.

    • Anca Luca
      Anca Luca, 2013/03/11 11:02

      Hi Dan, glad it helped you.

      About the issues that bothered you
      Issue 1
      I don't know why sanity check announces documents with "WebHome" as the parent to be "invalid" (may be because the sanity check script is outdated from this pov) but this is how entries parents are set when you create a new entry with app within minutes (if I remember correctly) and in any case parent is supposed to be resolved relative to the child page, so it should be fine.

      Issue 2
      I just tried creating a page with a + at the end on my local instance (xwiki 4.1.4 on a tomcat 6 and mysql 5) and I can access it fine. I created it from the create menu on the top left. Indeed the url is something like Sandbox/New+page+with+%2B for a page which is called "Sandbox.New page with +". Either the issue is something specific to the batch import (which would suprise me), or it's something specific to the handling of URLs/encoded characters on the instance you have (application server, proxy in front of the app server, etc). Also, on the same instance I managed to create a page ending in a space (encoded in the URL as + ), and I can access it fine, both from the page URL and with the link from the livetable of the space index.

  • slaecker
    slaecker, 2015/02/25 14:36

    On XWiki 6.3 there are no labels, only the code for fields and buttons, even after creating a translation for the locale in use.
    https://dl.dropboxusercontent.com/u/105595019/Screenshots/xwiki_batchimport_labelissue.png

    • Anca Luca
      Anca Luca, 2016/10/06 09:18

      This was just fixed in the 1.2 version of the application.

      Otherwise, the workaround is to go to "Administration", to the "Localisation" section and add "BatchImport.Translations" in the i18n bundles list.

Get Connected