Forum OpenACS Development: Re: Re: Re: XoWiki 0.33 -- storing files in the xowiki instance
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 http://127.0.0.1:8052/pages/?object%5ftype=%3a%3axowiki%3a%3aFile&edit%2dnew=1&return%5furl=%2fpages%2fen%2fTest referred by "http://127.0.0.1:8052/pages/?last%5fpage%5fid=11519&object%5ftype=%3a%3axowiki%3a%3aFile&name=image%3atest10%2ejpg&edit%2dnew=1&title=test10%2ejpg&return%5furl=%2fpages%2fen%2fTest" 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 "next" (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.
::xowiki::Link::image renderinstproc is that it calls [my info parent] which returns
::xowiki::Fileas 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
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!