Forum .LRN Q&A: Forums + Attachments in dotlrn 2.0 broken

Hi,

I just tried dotlrn 2.0.0b4 which includes openacs 5.0b4.  I tried setting a URL as an attachment to a forum posting, and I get the error below.  I had a quick look in the file storage package for fs::simple_get_type_pretty_name, and could not find it.  Any suggestions on how to resolve this?

Thanks,
Nick.

invalid command name "fs::simple_get_type_pretty_name"
    while executing
"fs::simple_get_type_pretty_name -type $type"
    invoked from within
"set pretty_name [fs::simple_get_type_pretty_name -type $type]"
    ("uplevel" body line 34)
    invoked from within
"uplevel {
          ad_page_contract {
    page to add a new nonversioned object to the system

    @author Ben Adida (mailto:ben@openforce.net)
    @author..."
    (procedure "code::tcl::/Users/spauser/web/spa/packages/attachments/www/s..." 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 Nick Carroll on
The function fs::simple_get_type_pretty_name is available in file-storage version 4 in the tcl file fs-simple-procs.tcl.  However this file does not exist in version 5.  Is there a reason why this file was removed from 5.0?
Collapse
Posted by Nick Carroll on
Copied fs-simple-procs.tcl and xql files from http://cvs.openacs.org/cvs/openacs-4/packages/file-storage/tcl/Attic/?only_with_tag=pre-i18n.  For some reason they have been placed in the Attic since pre-i18n.

Anyway, I can now attach URLs to forum postings.

Anybody know why the fs-simple-procs files were left out of OpenACS 5.0.0?

Collapse
Posted by Nick Carroll on
This was the note made when the fs-simple-procs files were removed from the repository.  It seems the problem is an attachments package problem, as it uses a tcl function that no longer exists.

Revision 1.4.2.1
Thu Mar 20 22:13:59 2003 UTC (9 months ago) by donb
Branch: oacs-4-6
Changes since 1.4: +1 -1 lines
FILE REMOVED
Removed the vile fs_simple_objects added by OF to store URLs in file
storage despite the existence of a non-versioned URL type in the content
repository.  Upgrade scripts provided.  I added Tcl API to the content
repository to honor our desire to export the SQL API to Tcl client code.

1. folder contents are now counted correctly (bug fix)
2. The fs_objects view is now usable in PG (it was a UNION view before and
  therefore didn't scale)
3. Code in file storage is considerably simpler now and all file storage
  objects are now stored in the content repository, as they should
  be.

The Oracle version may need some work I'll finish testing this afternoon.

Collapse
Posted by Nick Carroll on
Final solution is to replace attachments/www/simple-add.tcl with file-storage/www/simple-add.tcl.