Forum OpenACS Q&A: File Storage

Collapse
Posted by James Bennin on
I have installed and mounted the file storage package.  I have added few files, a url and a directory, so that the package can be populated.  I will doing the same to the FIle manager package as well.  The problem I am encountering is that I cannot perform a search on any of the items on this package.  Is there something wrong with the search, or this package is not searchable?
Collapse
2: Re: File Storage (response to 1)
Posted by Jarkko Laine on
Have you installed FtsContentProvider binding for file-storage? You have to do that for all the packages you want to be searchable.

To do this, go to yourdomain.com/acs-service-contract and click "install" for all FtsContentProviders you need. You might have to restart the server after that. Then add some content and try to search for it.

I'm not sure what you can search in file-storage. It might be that you can't at all search the contents of the stored files, just for their metadata. I'm not sure about this, tho.

Collapse
3: Re: File Storage (response to 2)
Posted by James Bennin on
Thank you for the tip on FtsContentProvider.  I did that for all the packages I wanted to be searchable but still not result.  I want the search to bring the name of the files I have stored in the file storage.
Collapse
4: Re: File Storage (response to 2)
Posted by James Bennin on
Also when I try to click on the " Download an archive of the contents of this folder " on the bottom of the main page, I get this error:

Request Error

invalid command name "publish_url"
    while executing
"publish_url -object_id $object_id -path $path -file_name $file_name"
    (procedure "publish_object_to_file_system" line 12)
    invoked from within
"publish_object_to_file_system  -object_id [ns_set get $object object_id]  -path $dir  -file_name [remove_special_file_system_characters -string [ns_se..."
    (procedure "publish_folder_to_file_system" line 16)
    invoked from within
"publish_folder_to_file_system -folder_id $object_id -path $path -folder_name $name -user_id $user_id"
    (procedure "fs::publish_object_to_file_system" line 10)
    invoked from within
"fs::publish_object_to_file_system -object_id $object_id -path $in_path -user_id $user_id"
    invoked from within
"set file [fs::publish_object_to_file_system -object_id $object_id -path $in_path -user_id $user_id]"
    (file "/web/service0/packages/file-storage/www/download-archive/index.vuh" line 41)
    invoked from within
"source [ad_conn file]"
    (procedure "rp_handle_tcl_request" line 3)
    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 -noredirect -nodirectory  -extension_pattern ".vuh" "$root$prefix""
    ("uplevel" body line 3)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
	  ad_conn -set path_info  [string range $path [expr [string length $prefix] - 1] end]
	  rp_serve_abstract_file -noredirect -nodirectory  -e..."


Thank you for your help
Collapse
5: Re: File Storage (response to 1)
Posted by Dirk Gomez on
Are you on Oracle or PostgreSQL?

And which Operating System?

(And incidentally: which version of OpenACS?)

Collapse
6: Re: File Storage (response to 5)
Posted by James Bennin on
I am using PostgreSQL 7.2 running on Red Hat Linux 8.0 with OpenACS 4.6.3.
Collapse
7: Re: File Storage (response to 1)
Posted by James Bennin on
I've tried to search and debug this error message that I am receiving, and I am still not successful.  Does anyone know how to fix it?

Thank you

Collapse
8: Re: File Storage (response to 1)
Posted by Randy O'Meara on
James,

The error is telling you that the publish_url proc is not defined. That proc is contained (ref 4.6 CVS) in the tcl library file packages/file-storage/tcl/file-storage-procs.tcl. So, it looks like the loading of that file at service start time is not successful. I would restart your service and look at the service error log and see if it's being loaded or why the load is failing.

You can ell if a proc is loaded and defined by browsing the TCL API of your running instance by going to /doc and selecting the API Browser. Plug the missing proc into the search box and see what comes up.

You can also check the file-storage package through the package manager. If something is fubar with the tcl library file, you may see an indication in the package manager.

Since you've indicated that file-storage was previously functional and that you were able to execute the basic UI, something probably broke it since your initial install.

You might have to do something drastic (not really all that drastic) like dropping and recreating your db, then restarting your service to perform a fresh install in order to fix this issue.

Randy

Collapse
9: Re: File Storage (response to 8)
Posted by James Bennin on
Thank I think if fixed it. The call was making reference to some function called "publish_url" which was not defined in the file. But there was a proc call "publish_url_to_file_name" instead, so I figure it was that function. So I made the replacement, and the command for archiving is working fine. I do not know if it is bug, or major enough to post it on the bug tracker and the fix for it. Either way, thank you for your help.
Collapse
10: Re: File Storage (response to 1)
Posted by Randy O'Meara on
James,

It looks like you have a version mismatch. As I stated above, publish_url is defined on the 4.6 CVS tip. You should look into this issue and be sure that you have a consistent system. It's quite possible that other related problems may arise. Best to nail it down now and save yourself headaches in the future.

Randy

Collapse
11: Re: File Storage (response to 10)
Posted by James Bennin on
Thank you for your concern.  I don't understand how I can have a mismatch version because I downloaded the openacs 4.6.3 tarball.  Should all the packages conform to the norm, which is the version 4.6.3?

Well, how do you think I can solve this mismatch problem?  What do you suggest I do?

Collapse
12: Re: File Storage (response to 11)
Posted by Randy O'Meara on
Hmmm... In that case, you probably stumbled over a real bug. You could check https://openacs.org/bugtracker/openacs/com/file-storage/ to see if it's logged. If not you might open a bug and, if you're so inclined, post a patch.

Randy