[xwiki-users] Export/Import doesn't parse velocity macros
Hi, working with http://old.xwiki.org/xwiki/bin/view/Test/ImportExport I could make it work a bit, but when select a couple of documents and press Export, the next output is shown: $export.setWithVersions(false) $export.setAuthorName($author) $export.setDescription($description) $export.setLicence($licence) $export.setName($packageName) $export.add($itemexp, $xwiki.parseInt($defaultAction)) $export.add($itemexp, $xwiki.parseInt($defaultAction)) $export.export() IMHO it's not interpreting the code generated as a velocity macro and just outputs the code contained in the page, so : - did anyone had the same problem, and solved it ?? - cold anyone that make it work on top of 0.9 tell me about any changes that are needed ?? TIA -- Víctor A. Rodríguez (http://www.bit-man.com.ar) El bit Fantasma (Bit-Man) - Algorithm junkie Perl Mongers Capital Federal (http://cafe.pm.org/) GNU/Linux User Group - FCEyN - UBA (http://glugcen.dc.uba.ar/
BTW, in v1.1 it doesn't works either. Of course export and import are already embedded in 1.1, in Administration tasks. Víctor A. Rodríguez wrote:
Hi,
working with http://old.xwiki.org/xwiki/bin/view/Test/ImportExport I could make it work a bit, but when select a couple of documents and press Export, the next output is shown:
$export.setWithVersions(false) $export.setAuthorName($author) $export.setDescription($description)
$export.setLicence($licence)
$export.setName($packageName) $export.add($itemexp, $xwiki.parseInt($defaultAction)) $export.add($itemexp, $xwiki.parseInt($defaultAction)) $export.export()
IMHO it's not interpreting the code generated as a velocity macro and just outputs the code contained in the page, so :
- did anyone had the same problem, and solved it ?? - cold anyone that make it work on top of 0.9 tell me about any changes that are needed ??
TIA
-- Víctor A. Rodríguez (http://www.bit-man.com.ar) El bit Fantasma (Bit-Man) - Algorithm junkie Perl Mongers Capital Federal (http://cafe.pm.org/) GNU/Linux User Group - FCEyN - UBA (http://glugcen.dc.uba.ar/
Víctor A. Rodríguez wrote:
BTW,
in v1.1 it doesn't works either. Of course export and import are already embedded in 1.1, in Administration tasks.
Víctor A. Rodríguez wrote:
Hi,
working with http://old.xwiki.org/xwiki/bin/view/Test/ImportExport I could make it work a bit, but when select a couple of documents and press Export, the next output is shown:
$export.setWithVersions(false) $export.setAuthorName($author) $export.setDescription($description)
$export.setLicence($licence)
$export.setName($packageName) $export.add($itemexp, $xwiki.parseInt($defaultAction)) $export.add($itemexp, $xwiki.parseInt($defaultAction)) $export.export()
I'm pretty sure i found the missing link : the packaging plugin !!! What I'll try to do is setup my development environment and compile this plug-in (http://svn.xwiki.org/svnroot/xwiki/xwiki-platform/core/trunk/xwiki-core/src/...)
if anyones think that I'm in the wrong path or has a better/simpler answer, just let me know. -- Víctor A. Rodríguez (http://www.bit-man.com.ar) El bit Fantasma (Bit-Man) - Algorithm junkie Perl Mongers Capital Federal (http://cafe.pm.org/) GNU/Linux User Group - FCEyN - UBA (http://glugcen.dc.uba.ar/
Hi Victor I see you have jumped one step forward and you made the export script work within 0.9. I did not the issue you are mentionning (parsing code) -yet. My problem emerges when unpacking in the new wiki 1.1.1. Although the package looks like a valid zip file -and the XML descriptor file validates- the import script cannot list the documents arguing it cannot parse the XML file (see JIRA issue WIKI-1809). Now my question: where do you get this information on the plugin? What does it do? Could you elaborate on what's useful in your case? Thank you Marc On October 18, 2007 06:10:37 pm Víctor A. Rodríguez wrote:
Víctor A. Rodríguez wrote:
BTW,
in v1.1 it doesn't works either. Of course export and import are already embedded in 1.1, in Administration tasks.
Víctor A. Rodríguez wrote:
Hi,
working with http://old.xwiki.org/xwiki/bin/view/Test/ImportExport I could make it work a bit, but when select a couple of documents and press Export, the next output is shown:
$export.setWithVersions(false) $export.setAuthorName($author) $export.setDescription($description)
$export.setLicence($licence)
$export.setName($packageName) $export.add($itemexp, $xwiki.parseInt($defaultAction)) $export.add($itemexp, $xwiki.parseInt($defaultAction)) $export.export()
I'm pretty sure i found the missing link : the packaging plugin !!! What I'll try to do is setup my development environment and compile this plug-in (http://svn.xwiki.org/svnroot/xwiki/xwiki-platform/core/trunk/xwiki-core/sr c/main/java/com/xpn/xwiki/plugin/packaging/)
if anyones think that I'm in the wrong path or has a better/simpler answer, just let me know.
Marc Lijour wrote:
Hi Victor
I see you have jumped one step forward and you made the export script work within 0.9. I did not the issue you are mentionning (parsing code) -yet. My problem emerges when unpacking in the new wiki 1.1.1. Although the package looks like a valid zip file -and the XML descriptor file validates- the import script cannot list the documents arguing it cannot parse the XML file (see JIRA issue WIKI-1809).
You're completely right, I just made the arrangements to add export capabilities to v0.9 but there's a spectacular NullPointerException (BTW, we can't continue with this migration until this is solved)
Now my question: where do you get this information on the plugin? What does it do? Could you elaborate on what's useful in your case?
Basically I began to look into the response that was generated by our exportImport script, adding the next pieco of code to it, after the #elseif ($action == "export") instruction and also after all things were set : <!-- request.getParameterValues("toExport")) : $request.getParameterValues("toExport")) request.withHistory : $request.withHistory request.author : $request.author request.description : $request.description request.licence : $request.licence request.version : $request.version request.packageName : $request.packageName xwiki.package : $xwiki.package xwiki : $xwiki --> which looked like this in my browser (looking at the generated code or CTRL+U in Firefox) : <!-- request.getParameterValues("toExport")) : [Ljava.lang.String;@48ec77cb) request.withHistory : true request.author : XWiki.XWiki.Admin request.description : This is my magnificent description request.licence : LGPL request.version : 1.0 request.packageName : package xwiki.package : $xwiki.package xwiki : com.xpn.xwiki.api.XWiki@36ed5ba6 --> As you can see in wiki.package, when something can't be found it is taken as a literal, so I began to search in google about $wiki.package, and fund a page wit the code for class PackagePlugin inside package com.xpn.xwiki.plugin.packaging, adn looking inside the xwiki-web-standard-1.1-hsqldb.war (the one user for XWiki distribution) I found where it is located (BTW, it was inside xwiki-core-1.1.jar) The rest is quite simple : extract the com/xpn/xwiki/plugin/packaging/Package* files, repackage them as xwiki-packaging-plugin-1.1.jar, copy it to you 0.9 install inside webapps/xwiki/WEB-INF/lib and add the class com.xpn.xwiki.plugin.packaging.PackagePlugin to your xwiki.plugins entri inside webapps/xwiki/WEB-INF/xwiki.cfg I'll all this instructions to the wiki ASAP (I think that during today Friday or tomorrow) Hope this helps. -- Víctor A. Rodríguez (http://www.bit-man.com.ar) El bit Fantasma (Bit-Man) - Algorithm junkie Perl Mongers Capital Federal (http://cafe.pm.org/) GNU/Linux User Group - FCEyN - UBA (http://glugcen.dc.uba.ar/
Víctor A. Rodríguez wrote:
Marc Lijour wrote:
Hi Victor
I see you have jumped one step forward and you made the export script work within 0.9. I did not the issue you are mentionning (parsing code) -yet. My problem emerges when unpacking in the new wiki 1.1.1. Although the package looks like a valid zip file -and the XML descriptor file validates- the import script cannot list the documents arguing it cannot parse the XML file (see JIRA issue WIKI-1809).
You're completely right, I just made the arrangements to add export capabilities to v0.9 but there's a spectacular NullPointerException (BTW, we can't continue with this migration until this is solved)
Now my question: where do you get this information on the plugin? What does it do? Could you elaborate on what's useful in your case?
I'll all this instructions to the wiki ASAP (I think that during today Friday or tomorrow)
Finally I added them to http://www.xwiki.org/xwiki/bin/view/AdminGuide/Installation#HUpgradinganXWik... Please, take a look at them, just to see if everything fits in the proper hole Hope this helps. -- Víctor A. Rodríguez (http://www.bit-man.com.ar) El bit Fantasma (Bit-Man) - Algorithm junkie Perl Mongers Capital Federal (http://cafe.pm.org/) GNU/Linux User Group - FCEyN - UBA (http://glugcen.dc.uba.ar/
On Oct 22, 2007, at 5:33 PM, Víctor A. Rodríguez wrote:
Víctor A. Rodríguez wrote:
Marc Lijour wrote:
Hi Victor
I see you have jumped one step forward and you made the export script work within 0.9. I did not the issue you are mentionning (parsing code) -yet. My problem emerges when unpacking in the new wiki 1.1.1. Although the package looks like a valid zip file -and the XML descriptor file validates- the import script cannot list the documents arguing it cannot parse the XML file (see JIRA issue WIKI-1809).
You're completely right, I just made the arrangements to add export capabilities to v0.9 but there's a spectacular NullPointerException (BTW, we can't continue with this migration until this is solved)
Now my question: where do you get this information on the plugin? What does it do? Could you elaborate on what's useful in your case?
I'll all this instructions to the wiki ASAP (I think that during today Friday or tomorrow)
Finally I added them to http://www.xwiki.org/xwiki/bin/view/AdminGuide/ Installation#HUpgradinganXWikiv09Installation Please, take a look at them, just to see if everything fits in the proper hole
Hope this helps.
Thanks Victor. One thing though. On that page the information is a bit confused. There are two sections called "Database copy" and 2 sections called "Import/Export". Thanks -Vincent
Vincent Massol wrote:
One thing though. On that page the information is a bit confused. There are two sections called "Database copy" and 2 sections called "Import/Export".
Ready !!! -- Víctor A. Rodríguez (http://www.bit-man.com.ar) El bit Fantasma (Bit-Man) - Algorithm junkie Perl Mongers Capital Federal (http://cafe.pm.org/) GNU/Linux User Group - FCEyN - UBA (http://glugcen.dc.uba.ar/
participants (3)
-
"Víctor A. Rodríguez" -
Marc Lijour -
Vincent Massol