Forum OpenACS Development: Re: XoWiki 0.33 -- storing files in the xowiki instance

Posted by Stan Kaufman on
It appears that the form_parameter variable of ::xowiki::Package isn't getting reset.

In /xowiki/tcl/package-procs.tcl, the ::xowiki::Package create instproc was commented out for some reason, so when a new ::xowiki::Package was getting created in /xowiki/www/index.vuh, it wasn't getting created cleanly/correctly.

Restoring that instproc seems to do the trick -- at least the image object gets created and the page will display once you navigate back to it. However, the image object creation step return an error from the ::xowiki::Link::image render proc:

 [08/Aug/2006:15:00:48][6355.1029776][-conn:oacs52::0] Error: POST
referred by ""
invalid command name "::xotcl"
    while executing
"$page lappend references [list $item_id [my type]]"
    (procedure "render" line 8)
    ::xotcl::__#35 ::xowiki::Link::image->render
    invoked from within
"$l render"
    (procedure "get_content" line 23)
    ::xotcl::__#32 ::xowiki::File->get_content
    invoked from within
"my get_content"
    (procedure "render" line 11)
    ::xotcl::__#32 ::xowiki::Page->render
    invoked from within
"$data render -update_references"
    (procedure "update_references" line 8)
    ::xowiki::f1 ::xowiki::WikiForm->update_references
    invoked from within
"my update_references"
    (procedure "new_data" line 7)
    invoked from within
    (procedure "new_data" line 4)
    ::xowiki::f1 ::xowiki::FileForm->new_data
    invoked from within
"::xowiki::f1 new_data"
    invoked from within
"set item_id [::xowiki::f1 new_data]"

This looks like it's probably due to a typo, but I can't figure it out.

Posted by Stan Kaufman on
The problem with the ::xowiki::Link::image render instproc is that it calls [my info parent] which returns ::xotcl instead of ::xowiki::File as it should.

Since ::xowiki::Link::image is ultimately just an ::xotcl::Object, it's not clear where its parent would ever get set. In fact, [my info vars] on a link image object returns just these vars: package_id folder_id label name lang type stripped_name.

So should ::xowiki::Link have a superclass, say, ::xowiki::Object? Or does parent need to get set at initialization of an object? Or is parent something that needs to be computed via an instproc like resolve?

Gustaf, I know that you said you're going to provide a fix with a 0.34 version, but if you wouldn't mind thinking aloud here about this stuff, it would certainly help us all to understand how to work with your packages. Thanks!