Forum OpenACS Q&A: static pages breaks while scanning

Collapse
Posted by Lokman Tsui on
i have a fresh openacs 4.6 install with general-comments installed and static-pages 4.3

when i try to scan for files to add, it gives me the following error

NB:
ccm is the directory i added

it seems to find the new directory but then breaks on the function "cr_filename_to_mime_type"

any ideas? i tried installing the static-pages 4.2 package instead; i do not get error messages from the 4.2 package but it refuses to find any new files. (ie find 0 files)

---
ccm/: addedHTTP/1.0 200 OK Server: AOLserver/3.4.2 MIME-Version: 1.0 Date: Tue, 04 Mar 2003 23:22:44 GMT Content-Type: text/html Content-Length: 3038 Connection: keep-alive

Request Error

invalid command name "cr_filename_to_mime_type"
    while executing
"cr_filename_to_mime_type -create $sp_filename"
    (procedure "sp_sync_cr_with_filesystem_internal" line 250)
    invoked from within
"sp_sync_cr_with_filesystem_internal  -file_add_proc          $file_add_proc          -file_change_proc      $file_change_proc      -file_unchanged_p..."
    (procedure "sp_sync_cr_with_filesystem" line 7)
    invoked from within
"sp_sync_cr_with_filesystem  -file_unchanged_proc sp_old_item  -file_add_proc sp_new_item  -file_change_proc sp_changed_item  -file_read_error_proc sp_..."
    invoked from within
"ns_write "
<p>
[sp_sync_cr_with_filesystem  -file_unchanged_proc sp_old_item  -file_add_proc sp_new_item  -file_change_proc sp_changed_item  -file_rea..."
    ("uplevel" body line 54)
    invoked from within
"uplevel {
          # packages/static-pages/www/admin/fs-scan-progress.tcl
ad_page_contract {
    Scan the file system for static pages.  If there are ma..."
    (procedure "code::tcl::/web/openacs-4-6/packages/static-pages/www/admin/..." 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 Don Baccus on
I believe that cr_filename_to_mime_type was added in 4.6.1, not 4.6 itself - did you pull the latest static pages from CVS?

The easiest thing to do is to revisit the download page and install 4.6.1 beta 2, which Jeff Davis uploaded to the repository earlier today or late yesterday.

We expect this to become 4.6.1 final on Friday.  I just checked and the proc cr_filename_to_mime_type is in 4.6.1 so you shouldn't run into this problem.

Collapse
Posted by Andrew Piskorski on
Lokman, Don's right, Jeff Davis just created the new
cr_filename_to_mime_type proc and changed the Static Pages to use it
(c. Feb. 6) in oacs-4-6-1-b2.  So it sounds like you have version skew
between your acs-content-repository and static-pages packages.