Forum OpenACS Q&A: Problems using File Manager Package

Collapse
Posted by Nima Mazloumi on
Dear all,

I installed the File Manager package incl. the version control package and created a new instance. Within the file manager I can see on the left a navigation for all the directories but when I click on one I get the error message below. Any idea why this happens?

best wishes,
Nima

Request Error
invalid command name "file-upload?path=/www/unima0/apm-workspace/install {Add a File}"
    while executing
"[list "file-upload?path=$path" "Add a File"] \
"
    invoked from within
"if [empty_string_p $path] {

    append output "<p>Choose a directory to list its contents.</p>"

} else {

    append output "

    [fm_optio..."
    ("uplevel" body line 23)
    invoked from within
"uplevel {
          # /www/admin/file-manager/file-list.tcl

ad_page_contract {
    @author
    @author
    ..."
    (procedure "code::tcl::/www/unima0/packages/file-manager/www/file-list" 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 7)
    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([ad_conn url]) [ad_conn path_inf..."

Collapse
Posted by Jeff Davis on
It's almost certainly a noquote problem but which master template is this using?
Collapse
Posted by Nima Mazloumi on
Where can I find that out? It is certainly not using the dotlrn-master template. This is what I see:

File Manager

Main Site : server-admin : File Manager : {File Manager}

Choose a directory to list its contents.

mazloumi @ server.de
Collapse
Posted by Jeff Davis on
Ah, I spoke too soon, its not templated at all and the bug looks like it's in the tcl code for the context bar.  I will
take a quick look.  Which version of OpenACS is this from?
Collapse
Posted by Nima Mazloumi on
I downloaded the package from openacs-4 right under head or shall I try to use file-manager and version control from head directly?
Collapse
Posted by Jeff Davis on
I can't reproduce this, could it be that you converted this to dos line endings (which would make this:
[fm_options_list \
	[list "file-edit?path=$path" "Edit"] \
	[list "[fm_pageroot_relative_path $path]" "View"]]
in file-upload.tcl produce exactly this error...

you might try smashing this all onto one line and see if the problem goes away...

Collapse
Posted by Nima Mazloumi on
I tried it out but nothing changed :(