Forum OpenACS Development: XoWiki import error

Collapse
Posted by Eduardo Santos on
I'm using XoWiki 0.37 and I'm facing some import problems. When I try to import small instances in a txt file the system works ok. However, when I try to import a big instance with a txt file with abou 200 K the system shows me the following error:

can't read "import_file": no such variable while executing "cr_create_content_file $item_id $revision_id $import_file" invoked from within "if {$storage_type eq "file"} { set text [cr_create_content_file $item_id $revision_id $import_file] }" ("uplevel" body line 8) invoked from within "uplevel 1 $transaction_code " (procedure "db_transaction" line 1) invoked from within "db_transaction { $__class instvar storage_type object_type $__class folder_type -folder_id $parent_id register db_dml lock_objects "..." (procedure "save_new" line 28) invoked from within "next" (procedure "save_new" line 3) ::1100784 ::Generic::CrCache::Item->save_new invoked from within "$o save_new" (procedure "import" line 26) ::xowiki::Page->import invoked from within "::xowiki::Page import" invoked from within "if {[catch {eval $content} error]} { set msg "Error: $error" } else { set msg [::xowiki::Page import] }" ("uplevel" body line 12) invoked from within "uplevel #$level $on_submit" ("1" arm line 1) invoked from within "switch $errno { 0 { # TCL_OK } 1 { # TCL_E..." (procedure "ad_form" line 612) invoked from within "ad_form -name upload_form -mode edit -export {fs_package_id folder_id orderby selector_type file_types} -html { enctype multipart/form-data } -fo..." ("uplevel" body line 12) invoked from within "uplevel { ::xowiki::Package initialize -ad_doc { import objects in xotcl format @author Gustaf Neumann (mailto:gustaf.neumann@wu-wien.ac.at) @c..." (procedure "code::tcl::/var/www/spb/packages/xowiki/www/admin/import" line 2) invoked from within "code::tcl::$__adp_stub" invoked from within "if { [file exists $__adp_stub.tcl] } { # ensure that data source preparation procedure exists and is up-to-date adp_init tcl $__adp_stub ..." ("uplevel" body line 3) invoked from within "uplevel { if { [file exists $__adp_stub.tcl] } { # ensure that data source preparation procedure exists and is up-to-date adp_init t..." (procedure "adp_prepare" line 2) invoked from within "adp_prepare " (procedure "template::adp_parse" line 30) invoked from within "template::adp_parse [file root [ad_conn file]] {}" (procedure "adp_parse_ad_conn_file" line 5) invoked from within "$handler" ("uplevel" body line 2) invoked from within "uplevel $code" invoked from within "ad_try { $handler } ad_script_abort val { # do nothing }" invoked from within "rp_serve_concrete_file [ad_conn file]" (procedure "rp_serve_abstract_file" line 60) invoked from within "rp_serve_abstract_file "$root/$path"" ("uplevel" body line 2) invoked from within "uplevel $code" invoked from within "ad_try { rp_serve_abstract_file "$root/$path" set tcl_url2file([ad_conn url]) [ad_conn file] set tcl_url2path_info..."

I guess this error is related to the file upload, but I couldn't solve it. Any ideas?

Collapse
2: Re: XoWiki import error (response to 1)
Posted by Gustaf Neumann on
The reason is quite simple: import for ::xowiki::File was added to xowiki on March 1 (8 months, 95 revisions of xowiki-procs ago), xowiki 0.37 is from Sep 15 2006 UTC (13 months ago). I am rather wondering that you can import "small instances of a txt file"

Why are you using such an ancient version of xowiki?

Collapse
3: Re: XoWiki import error (response to 2)
Posted by Eduardo Santos on
Hi Gustaf,

You where right. My XoWiki version was too old, and an update solved the problem. However, I have a version compatibility problem that I can't solve right now. I have one XoWiki instance that I've exported from another site, wich should be version 0.4X, and i'm using the latest version (0.60). I need to import the contest from this old version, wich I can't upgrade, to a new version.

I've tried to do it, but it seems like the new XoWiki import method has a new parameter: __file_content. This parameters isn't in the old version I exported, but it's required to import in the new version. Do you think there's any workaround to make it work?

Collapse
4: Re: XoWiki import error (response to 3)
Posted by Gustaf Neumann on
At the time, file export/import was implemented (march 1), __file content was added. The interface has not changed in this regard. If i compare version numbers with the dates, this relates to xowiki 0.48.
http://cvs.openacs.org/cvs/openacs-4/packages/xowiki/xowiki.info?rev=1.69&view=log

My recommendation is
- to upgrade the site from where you want to export to xowiki 0.48 (this include support for the File export) and
- then export from the old site and
- import into the new site.