Installation broken after import

After I installed a fresh instance of XWiki on an ubuntu server I

  1. ran the Distribution Wizard to get thesuperadmin account up and running
  2. imported the content from a XAR archive from another XWIki instance.

After the import was done, the whole instance seems broken:
Theres no more content visible at all, all panels show the following:

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:XWiki.InplaceEditing]. Check the rights of its last author or the parameters if it’s rendered from another script.]. Click on this message for details.

The login is the only thing that appears to be working.
I can still log in with the super-admin, but nothing can be done - theres no admin-panel: the hamburger menu on the top right is completely empty.

What can I do next?

Well so not so fresh then :slight_smile:

What is exactly the need here ? Just move an existing wiki from one server to another ? Use a different kind of database engine ?

I would recommend to not use XAR format to backup/restore an entire wiki since it’s missing some data currently (the notifications preferences for example) so when possible you should try to backup and restore the database using this database tools (mysql dump, etc.). Also you did not mentioned the permanent directory which is another place where data are stored. You might want to take a look at

1 Like

Thank you for the quick reply! :slight_smile:

I need to move the content from the initial instance to the actual server.
So you’re right - what i want to get running isn’t exactly a new/fresh install in that sense then :wink:

The original instance/server was the hosted demo and I just exported the XAR - Its not super huge.
i had tested the export/import before with a local xwiki installation, and it worked back then without a problem.
But it’s all i have to work with right now, because i can no longer access the demo :frowning:

Is the new instance the same XWiki version than the one you exported the XAR from ?

Export/import from one version to another works fine but you have to keep in mind that the XAR you are trying to import contains a lot of standard pages (unless you exported only data pages ?) which expect to run in a specific version of XWiki.

Thanks again for the help.
The Versions do in fact differ:

  • the xwiki from which i exported had an 11-based version
    (I cannot look up the exact version - looking through the xar file, it doesn’t seem to have a manifest or)
  • the fresh version is based on the latest .deb archive - so it is running 12.9

When i imported, i tried to omit some of the standart-content pages.
Also I did run one test a few weeks earlier, where i tried to import an earlier XAR-export on a 12.9 xwiki-instance that I installed locally on my dev machine - that seemed to work fine back then.

It’s not easy since XWiki Standard contains something like 700 wiki pages.

I would really recommend to put your backup in a XWiki instance of the same version than the one from which you exported the XAR (in which case you don’t have to worry about what to exclude) and then do a standard upgrade. There is many differences between 11.x and 12.9 (even if not always obvious visually).

thanks again, I have now removed the packages

  • xwiki-common
  • xwiki-tomcat9-common
  • xwiki-mysql-common
  • xwiki-tomcat9-mysql

which were all at 12.9, and reinstalled 11.10.8 (just a guess, since i dont know the exact version of the original instance).
However i have not yet reset the data in the mysql db.
I restarted the tomcat server, and now properly 11.10.8 is running, but i get pretty much the exact same situation as before.

How should i proceed? is there a straightforward way to clear/reset the mysql data?

You should, and also delete /var/lib/xwiki/data (you could have used apt purge when you uninstalled them too). To start clean and be sure to have the same thing as what you used to have.

You just need to delete the database xwiki.

Forgot to mention: I did actually use purge.- just to be sure, I

  • deleted the content of /var/lib/xwiki/data, (not sure if it was empty, didnt check)
  • dropped the xwiki-database and
  • purged all packages and reinstalled them again

Now I got a fresh installation running again on v11.10.8
I was quite cautious and only ran the distribution wizard to create a super-user - didn’t even install any flavor first.

Then i only imported very few things from the XAR:

  • Invitation
  • Mail
  • Main
  • XWiki

so far that worked and I do have my old user-account back it seems.

However, without even the admin interface and extension manager it is quite hard to do anything in XWiki. So I reran the Distribution-Wizard and installed the ## XWiki Standard Flavor.
But it seems that the admin interface Extension-Manager still aren’t available.

hm, thinking about it, the admin panel must have been in there before - how would i otherwise have been able to import content from the package…
I am confused - has something happened with the users, so that i cannot access the admin panel anymore?

I guess I’ll enable superadmin and try to get int that way, to check what has happened.

You get a minimal admin with import in an empty wiki.

I don’t understand, if you installed the flavor you must have Extensions administration. Plus the Extension administration being located in the XWiki space you must have imported it too. You don’t have any administration section or you are just missing some of them ?

I got it all to work now :wink:
It appears that with the import suddenly there no user in the admin group.
With the config-superuser i could simply move the admin users back.
Now everything is fine, and i could successfully import the rest of the content from the XAR file.

The last - unrelated - thing i did today was install a letsencrypt ssl certificate (which was a bit of a hassle)

Really ? I always found the integration of Apache 2 provided by Certbot ( very easy to use. But maybe it’s not as easy when you are not on Debian or with other HTTP proxies.

Youre right, I did use Certbot, and I do like its documentation a lot - but the instructions i could find for tomcat were not as good, and also probably I’m just spoiled and too unknowledgeable with server management in general :wink:
I had to …

  1. Realize, that the default-way to install certbot is some app-bundle format called ‘stack’ now, instead of some plain old debian package - but that was pretty straightforward
  2. run certbot and then convert the pem output with openssl and keytool twice to obtain that old java keystore format (at least thats how most sources i found did it)
  3. edit the tomcat server.xml
  4. make sure, that tomcat actually is able to read the keystore. (that took by far the longest time)
    I put the keystore it in several different locations - which were also suggested by several tutorials (for instance simply /tmp/) - I always made sure, that the tomcat-user has all rights on the folder and the file - but tomcat kept refusing to find the file on startup.

Finally i moved it to /var/lib/xwiki/data/keystore and then it worked.

OK so let’s encrypt+tomcat use case. I tend to prefer having an Apache 2 in front of Tomcat but it’s more an habit than something based on a real study. At least it makes setting up let’s encrypt much easier than what you listed :slight_smile: