Forum OpenACS Development: Re: xowiki crashes

Collapse
2: Re: xowiki crashes (response to 1)
Posted by Stan Kaufman on
Weird. With an oacs-5-2 install plus xotcl 1.5.2, xotcl-core 0.44 and xowiki 0.37, adding a page here doesn't crash the server but does generate this error:

wrong # args: should be "ns_cache names cache"
    while executing
"ns_cache names xowiki_cache link-*-$folder_id"
    (procedure "update_references" line 16)
    ::xowiki::f1 ::xowiki::WikiForm->update_references
    invoked from within
"my update_references"
    (procedure "new_data" line 7)
    ::xowiki::f1 ::xowiki::WikiForm->new_data
    invoked from within
"::xowiki::f1 new_data"
    invoked from within
"set item_id [::xowiki::f1 new_data]"
    ("uplevel" body line 1)
    invoked from within
"uplevel #$level $new_data"
    ("1" arm line 1)
    invoked from within
"switch $errno {
                    0 {
                        # TCL_OK
                    }
                    1 {
                        # TCL_E..."
    (procedure "ad_form" line 612)
    invoked from within
"ad_form -extend -name [my name]  -validate [my validate]  -new_data $new_data -edit_data $edit_data -on_submit $on_submit  -new_request $new_request -..."
    (procedure "generate" line 45)
    ::xowiki::f1 ::Generic::Form->generate
    invoked from within
"::xowiki::f1 generate -export [list [list return_url $return_url]]"
    (procedure "edit" line 57)
    ::xotcl::__#04 ::xowiki::Page->edit
    invoked from within
"$page edit -new true"
    (procedure "edit-new" line 6)
    ::11922 ::xowiki::Package->edit-new
    invoked from within
"$object $method"
    (procedure "call" line 6)
    ::11922 ::xowiki::Package->call
    invoked from within
"my call $page $method"
    (procedure "invoke" line 8)
    ::11922 ::xowiki::Package->invoke
    invoked from within
"::$package_id invoke -method $m"
    invoked from within
"::$package_id reply_to_user [::$package_id invoke -method $m]"
    (file "/web/oacs52/packages/xowiki/www/index.vuh" line 21)
    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 "$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..."

    * I
Collapse
3: Re: xowiki crashes (response to 2)
Posted by Stan Kaufman on
Hmm...looks like Gustaf knows this is broken. From /xowiki/tcl/xowiki-form-procs.tcl:

  WikiForm instproc update_references {} {
    my instvar data
    if {![my istype PageInstanceForm]} {
      ### danger: update references does an ad_eval, which breaks the [template::adp_level]
      ### ad_form! don't do it in pageinstanceforms.
      $data render_adp false
      $data render -update_references
    }
    # delete the link cache entries for this item 
    # could be made more intelligent to delete entries is more rare cases, like
    # in case the file was renamed
    my instvar folder_id
    ##### why is ns_cache names xowiki_cache *pattern*   not working??? 
    ##### upgrade ns_cache from CVS !
    foreach entry [ns_cache names xowiki_cache link-*-$folder_id] {
      array set tmp [ns_cache get xowiki_cache $entry]
      if {$tmp(item_id) == [$data set item_id]} {
        ns_cache flush xowiki_cache $entry
      }
    }
    if {![$data istype ::xowiki::Object] &&
        ![$data istype ::xowiki::PageTemplate] } {
      ::xowiki::notification::do_notifications -page $data
    }
  }

This error occurs with version 1.5 of nscache which is in cvs with aolserver 4.0.10 and thus presumably the most up to date. Gustaf, while ns_cache isn't working when passed a pattern, how should this be fixed so that we don't slam into an error?

Collapse
4: Re: xowiki crashes (response to 3)
Posted by Gustaf Neumann on
See the 2nd line of the comment: get an update of ns_cache. ns_cache supports the pattern since more than 2 years

cvs -z3 -d:pserver:mailto:anonymous@aolserver.cvs.sourceforge.net:/cvsroot/aolserver co nscache

Jon:
The crash indicates most likely a mixup of different tcl versions used for different aolserver modules. Since you
have a fresh installation, be sure to point to the tcl version explicitely.

As well, i would recommend to run xowiki/admin/test
-gusaf