Forum OpenACS Development: Re: Res: Re: Re: dotlrn chat

Collapse
Posted by Emmanuelle Raffenne on
Hi Rodrigo:

I've installed chat-ajax and xotcl-core. I'm using dotlrn on openacs 5.2.2 (at localhost:8000). When I go to AJAX chat I receive a "file not found" and in the error log:

Error: error flushing "sock19": connection refused
error flushing "sock19": connection refused
while executing
"flush $w"
(procedure "chat_receive_from_server" line 11)
invoked from within
"chat_receive_from_server 127.0.0.1 8200"

I revise my hosts.allow/deny in case, port 8200 is not filtered.

Any idea?

Collapse
Posted by Rodrigo Proença on
Hi Emmanuelle,

Thank you for the interest and sorry for the bug. I leave old archives with JAVA SERVER references in this release. After make a fresh install using dotlrn 2.2 tarball to test i can reporduce your error and clean some code to remove this references.

I sent new version on same folder to replace to older.

After intall chat applet and xotcl-core i receive this error message when I enter in a room

::template::login: unable to dispatch method 'chat_id' during '::template::login chat_id'
::template::login ::xotcl::Object->configure
::chat::Chat ::xotcl::Class->create
::chat::Chat ::xotcl::Class->unknown
invoked from within

To solve this, just add this lines to /packages/acs-bootstrap-installer/bootstrap.tcl

...
# LARS: Load packages/acs-automated-testing/tcl/aa-test-procs.tcl
ns_log Notice "Loading acs-automated-testing specially so other packages can define tests..."
apm_bootstrap_load_libraries -procs acs-automated-testing

+# GN: Should be loaded before user packages such they can use
+ # the xotcl infrastructure
+ if {[file isdirectory $root_directory/packages/xotcl-core]} {
+ apm_bootstrap_load_libraries -procs xotcl-core
+ }

Collapse
13: Re: dotlrn chat (response to 12)
Posted by Gustaf Neumann on
Please note, that when you install xotcl-core, you need two patches in addition to xotcl-core as described in http://media.wu-wien.ac.at/download/README-xotcl-core

cd /tmp
wget http://media.wu-wien.ac.at/download/acs-api-documentation-procs.patch
wget http://media.wu-wien.ac.at/download/acs-bootstrap-installer.patch

cd .../packages
patch -p 0 < /tmp/acs-api-documentation-procs.patch
patch -p 0 < /tmp/acs-bootstrap-installer.patch

Actually, i think these patches do no harm even when xotcl is not installed. As TIPed, they will be in oacs 5.3 anyhow. Would anyone object when i would add these patches to oacs 5.2 and commit these changes?

Collapse
14: Re: dotlrn chat (response to 12)
Posted by Emmanuelle Raffenne on
Rodrigo,

Thanks for the fix. I downloaded the new version, with it the connexion error disappear but I still had the "file not found". I edited tcl/chat-ajax-procs.tcl and remove the leading path:

--- chat-ajax-procs.tcl.OLD 2006-03-03 20:58:23.000000000 +0100
+++ chat-ajax-procs.tcl 2006-03-03 20:59:54.000000000 +0100
@@ -124,10 +124,10 @@
set file [open [acs_root_dir]/$path]; set js [read $file]; close $file
set location [util_current_location]
set path [site_node::get_url_from_object_id -object_id $package_id]
- set login_url $path/ajax/chat?m=login&$context
- set send_url $path/ajax/chat?m=add_msg&$context&msg=
- set get_update "chatSendCmd(\"$path/ajax/chat?m=get_new&$context\",chatReceiver)"
- set get_all "chatSendCmd(\"$path/ajax/chat?m=get_all&$context\",chatReceiver)"
+ set login_url ajax/chat?m=login&$context
+ set send_url ajax/chat?m=add_msg&$context&msg=
+ set get_update "chatSendCmd(\"ajax/chat?m=get_new&$context\",chatReceiver)"
+ set get_all "chatSendCmd(\"ajax/chat?m=get_all&$context\",chatReceiver)"
return "\
&lt;script type='text/javascript' language='javascript'&gt;
$js

and it works fine now.