Home
The Toolkit for Online Communities
17704 Community Members, 0 members online, 3904 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Development : Strange bug in the search package

Forum OpenACS Development: Strange bug in the search package

Icon of envelope Request notifications

Collapse
Posted by Eduardo Santos on
I have the search version 5.3.0b1 installed, but I use OpenACS 5.2.3. I can see there's a very strange bug in my search package. When I try to search the words "php" and "mysql" the following error appears to me:

invalid command name "::0"
    while executing
"::[my folder_id] get_payload $attribute"
    (procedure "get_parameter" line 4)
    ::3106 ::xowiki::Package->get_parameter
    invoked from within
"my get_parameter use_connection_locale 0"
    (procedure "default_locale" line 4)
    ::3106 ::xowiki::Package->default_locale
    invoked from within
"my default_locale"
    (procedure "default_language" line 3)
    ::3106 ::xowiki::Package->default_language
    invoked from within
"my default_language"
    (procedure "pretty_link" line 5)
    ::3106 ::xowiki::Package->pretty_link
    invoked from within
"::$package_id pretty_link [$page name]"
    (procedure "instantiate_page_from_id" line 17)
    ::xowiki::Package->instantiate_page_from_id
    invoked from within
"::xowiki::Package instantiate_page_from_id -revision_id $revision_id -user_id 0"
    (procedure "::xowiki::datasource" line 4)
    invoked from within
"::xowiki::datasource $object_id"
    (procedure "AcsSc.ftscontentprovider.datasource.xowiki_page" line 1)
    invoked from within
"AcsSc.ftscontentprovider.datasource.xowiki_page 3985"
    ("uplevel" body line 1)
    invoked from within
"uplevel $func_and_args"
    (procedure "apply" line 3)
    invoked from within
"apply $proc_name $arguments"
    (procedure "acs_sc_call" line 6)
    invoked from within
"acs_sc_call FtsContentProvider datasource [list $object_id] $object_type"
    ("for" body line 10)
    invoked from within
"for { set __i 0 } { $__i < [expr $high - $low +1] } { incr __i } {

    set object_id [lindex $result(ids) $__i]
    set object_type [acs_object_type ..."
    ("uplevel" body line 170)
    invoked from within
"uplevel {
ad_page_contract {
    @author Neophytos Demetriou <k2pts@cytanet.com.cy>
    @creation-date September 01, 2001
    @cvs-id $Id: search.tcl,..."
    (procedure
    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 5)
    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..."

Sometimes I have a different one:

site_node::get "must pass in either url or node_id"
    while executing
"error "site_node::get \"must pass in either url or node_id\"""
    (procedure "get" line 4)
    invoked from within
"get -url [lindex [get_url_from_object_id -object_id $object_id] 0]"
    (procedure "site_node::get_from_object_id" line 3)
    invoked from within
"site_node::get_from_object_id -object_id $id"
    (procedure "init" line 6)
    invoked from within
"next"
    (procedure "init" line 4)
    ::3106 ::xowiki::Package->init
    ::xowiki::Package ::xotcl::Class->create
    invoked from within
"my create ::$package_id"
    (procedure "require" line 10)
    ::xowiki::Package ::xo::PackageMgr->require
    invoked from within
"my require -url $url $package_id"
    (procedure "initialize" line 21)
    ::xowiki::Package ::xo::PackageMgr->initialize
    invoked from within
"::xowiki::Package initialize  -package_id $package_id -user_id $user_id  -parameter $parameter -init_url false -actual_query """
    (procedure "instantiate_page_from_id" line 16)
    ::xowiki::Package->instantiate_page_from_id
    invoked from within
"::xowiki::Package instantiate_page_from_id -revision_id $revision_id -user_id 0"
    (procedure "::xowiki::datasource" line 4)
    invoked from within
"::xowiki::datasource $object_id"
    (procedure "AcsSc.ftscontentprovider.datasource.xowiki_page" line 1)
    invoked from within
"AcsSc.ftscontentprovider.datasource.xowiki_page 3985"
    ("uplevel" body line 1)
    invoked from within
"uplevel $func_and_args"
    (procedure "apply" line 3)
    invoked from within
"apply $proc_name $arguments"
    (procedure "acs_sc_call" line 6)
    invoked from within
"acs_sc_call FtsContentProvider datasource [list $object_id] $object_type"
    ("for" body line 10)
    invoked from within
"for { set __i 0 } { $__i < [expr $high - $low +1] } { incr __i } {

    set object_id [lindex $result(ids) $__i]
    set object_type [acs_object_type ..."
    ("uplevel" body line 170)
    invoked from within
"uplevel {
ad_page_contract {
    @author Neophytos Demetriou
    @creation-date September 01, 2001
    @cvs-id $Id: search.tcl,..."
    (procedure "code::tcl::/var/lib/aolserver/spb/packages/search/www/search" 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 5)
    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..."

It seems like the first error happens when I try to perform the search in a new page, where I didn't search for anything yet. The second one happens when I try to perform a search in a page with some search results, and I try to search for new ones. I have a dinamic portlet in xowiki that brings me the latest-portlet (with the last contributins in the community), the community name and description. I've created a page in xowiki wich includes the portlets, and the page must receive the community_id. The only place I think there can be such words is inside that page. Do you think there's anything to do?

Collapse
Posted by Dave Bauer on
It appears that the datasource procedure for the xowiki content is failing.

Can you sucessfull search for xowiki content that is not in a portlet?

Collapse
Posted by Eduardo Santos on
Well, I don't think it has anything to do with the procedure for the xowiki. I can search inside xowiki pages without any problems, and I can also search inside a xowiki instance supplying the package_id. The content search looks just fine. The bug is only with these words.
Collapse
Posted by Eduardo Santos on
Hi Dave,

Just updating the status. It seems like de callback datasource for xowiki::Page is missing. My log shows a warning that tells me this:

Notice: SEARCH search/www/search.tcl callback::datasource::::xowiki::Page not found

I was checking the code in cvs and it seems like Gustaf commented the line that used to implement it. Check it out:

http://cvs.openacs.org/cvs/openacs-4/packages/xowiki/tcl/xowiki-callback-procs.tcl?rev=1.10&view=markup

I don't know if it's like this right now, but should I unistall it? It seems like the search is performed in a different way now.