Using XFF filter to import XWiki pages

I try to follow the guide provided on XFF filter page to generate XFF structure with pages to import and then Filter streams converter to execute the import process. Frankly speaking, I’m not sure if I understand correctly the process I need to go through to import pages.

Unfortunately during conversion I get error saying (please also see the screenshot attached below)

Don’t know how to parse this kind of XFF format

image

I prepared a basic sample of the structure in import.xff file which is available below (please change extension to .xff or .zip to see the content):
import.xff.txt (1.9 KB)

└───index.txt
└───wikis
    └───xwiki
        └───wiki.xml
        └───spaces
            └───MySpace
                └───pages
                    └───38577
                        └───page.xml

My configuration of XFF input stream is as follows:

Encoding: utf-8
Source: file:/home/myname/wikis.xff
Verbose: true

And the XWiki instance output stream (xwiki+instance):

Verbose: true
Save author: true

The rest is default.

I’d be very grateful for any advice on how to properly use XFF input stream to import pages. I use XWiki 10.2 on Docker with PostgreSQL.

Hi Dominik. This extension was developed by a contributor who’s no longer active (not been active for years now). So it needs someone to maintain it/take the leadership/support it/improve it.

Feel free to look at the source code to understand it better. It’s available here:

We can certainly help you if you have generic XWiki questions but AFAIK there’s nobody active in the community and knowing this extension’s code ATM.

It’s a pity since it’s a nice extension :wink:

Maybe someone else has succeeded in using?

Thanks a lot for the clarification @vmassol! It’s really unfortunate that this extensions is no longer supported.

Do I understand correctly that I’d better use generic XML filter module or XAR one in order to import pages via filter stream?

XAR format is the current standard for this need, we use it for example to store wiki pages on git.

Are these valid examples of XAR files?

Could you provide me with some examples of a little bit more complex wikis stored as .xars?

Those are valid but very simple.

See for example https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-common module which have a few pages and a lot of dependencies to other XAR extensions.

Pretty much all the XAR extensions you can find on http://extensions.xwiki.org/xwiki/bin/view/Extension/ (Application, Color theme, etc.) are stored on github using XAR XML format.

1 Like

Thanks @tmortagne! This looks like a great starting point for me. I’ll try today and perhaps will return with result to you :slight_smile:

Hi Dominik,

I was the contributor of this extension and indeed, I don’t maintain it anymore. Actually, it’s been so long since I last used it that I’m not even sure I remember how to use it :stuck_out_tongue: However, one thing I remember is that I developed the Filter Stream import as part of an attempt to better support the standard Import Framework of XWiki. But in my use case (I developed XFF for a project), I was mostly using the REST endpoint to import the file. So you might want to try the REST endpoint instead, it has probably been more tested. Also, I think to recall that XFF doesn’t support all XWiki’s features. For example, I think you can only import, not export XFF format; there is no support for multi-languages; etc.

I’m sorry to not being able to help more but I’m pretty sure using XAR, the official format, is gonna cause you less problem at this point, unless you want to contribute to this extension.

1 Like

Hi @jsimard. Thanks for your response, I really appreciate it :slight_smile:

Your suggestion to use REST (and then tweak some data in database) is on my todo list just after I try to import pages with XAR format. Unfortunately, I work on this import process between ordinary work tasks so I haven’t got time to try this yet.

What I’d suggest is to flag this extension as obsolete or not maintained due to the reasons you listed.

Thanks and have a great day!