Hi everybody,
I'm facing some troubles with the lars blogger migration script, mine above or Cognovis' in the address http://www.cognovis.de/developer/en/xowiki-upgrade-lars-blogger.
I'm using the latest XoWiki and XoTcl versions (0.95 and 0.90) and it seems like the script is broken. I've tried to change the script like this:
# Change the following variables to suit your environment
set pinds_package_id 3900
set xowiki_package_id 4345
set xowiki_folder_id 4368
db_1row template "select item_id as page_template, parent_id as xowiki_folder_id from cr_items where name = 'en:news-item' and content_type = '::xowiki::Form' and parent_id = :xowiki_folder_id"
## Do not change anything below
set import ""
db_foreach pinds_entry {select creation_user, creation_ip, creation_date, entry_date as last_modified, p.title, title_url as detail_link, content, content_format, draft_p from pinds_blog_entries p, acs_objects o where p.entry_id = o.object_id and p.package_id = :pinds_package_id} {
# Set publish status
if {$draft_p} {
set publish_status "production"
} else {
set publish_status "ready"
}
# Text conversion
if {$content_format ne "text/html"} {
set content [ad_html_text_convert -from $content_format -to "text/html" $content]
}
set item_id [db_nextval acs_object_id_seq]
set creator [person::name -person_id $creation_user]
set import "::xowiki::FormPage create \
page_template $page_template \
creator $creator \
instance_attributes {detail_link $detail_link} \
description {} \
text {$content} \
package_id $xowiki_package_id \
name $item_id \
title $title \
publish_status $publish_status \
last_modified $last_modified \
parent_id $xowiki_folder_id"
}
if {[catch {namespace eval ::xo::import $import} error]} {
set msg "Error: $error"
} else {
set msg [$xowiki_package_id import -replace 0]
}
But I keep seeing this error message:
invalid command name "4345"
while executing
"$xowiki_package_id import -replace 0
"
I've tried to find out, but I don't know where it's coming from. Can you help me on this?