Forum OpenACS Development: Re: Re: Contacts package

Collapse
9: Re: Re: Contacts package (response to 7)
Posted by Iuri Sampaio on
Malte,
i'm little lost, since i've dowonload from CVS but it didn't show up at acs-admin->Install package.

Then i went to the shell command and verify there was a sql srcipt there. I ran psql command: psql -f
then i got the error

$psql -f upgrade-0.3b3-0.4.sql
psql:upgrade-0.3b3-0.4.sql:1: ERROR: relation "acs_mail_log" does not exist
psql:upgrade-0.3b3-0.4.sql:2: ERROR: relation "acs_mail_log" does not exist
psql:upgrade-0.3b3-0.4.sql:3: ERROR: relation "acs_mail_log" does not exist
psql:upgrade-0.3b3-0.4.sql:4: ERROR: relation "acs_mail_log" does not exist
CREATE FUNCTION

so, it seems it's missing a old-version because this is only an update.

Collapse
Posted by Malte Sussdorff on
First of all, you should not run the upgrade without having upgraded and installed mail-tracking first. This is why there are the dependencies 😊.

So, I would install mail-tracking, upgrade to the latest openacs-5-2-3 release and then try to run the upgrade again. No clue why it does not show up, but you might be able to install it from repository.

Collapse
Posted by Iuri Sampaio on
yes malte, i understand exaclty what you said. It's the logical sense :)

the thing is i'm still trying to install contacts package

i've dowonloaded a couple of packages. now it's missing mail-tracking 0.3d, which i have no clue where to find it.

i'm using this CVS comand to get the packages
cvs -d :pserver:mailto:anonymous@cvs.openacs.org:/cvsroot co -r oacs-5-2 package-name

and i get this error:
cvs checkout: warning: failed to open /home/yabtdev/.cvspass for reading: No such file or directory
cvs server: cannot find module `mail-tracking' - ignored
cvs [checkout aborted]: cannot expand modules

please, let me know

Collapse
Posted by Malte Sussdorff on
Do yourself a favour and make a full checkout from HEAD. Here is the command sequence:

cvs -d mailto:anonymous@cvs.openacs.org:/cvsroot co openacs-4
mv openacs-4 HEAD
cd myserver/packages
rm -rf acs-mail-lite *contact* *ams*
mv ../../HEAD/packages acs-mail-lite *contact* *ams* *mail-tracking* .

That should get you started.

Why the need for the new acs-mail-lite. The latest mail tracking depends on it, as we considerably enhanced the capabilities, e.g. allow sending of one single e-mail with multiple "TO", "CC" and "BCC" recipients.

Note: you need tcllib installed.

Second note: Please be aware that this is still bleeding edge.

Collapse
Posted by Jon Griffin on
Malte,
I am baffled with how acs-mail-lite is supposed to work. I can see mailto:bounce-292-AE2F291F86F3F079E91698832329ECA81E492657-258@mayuli.com

in my qmail delivery, but the message is never recieved. What is the purpose of this insane complexity to send a message?

Also, I notice that you need tcllib to work now, any hints on using it with OACS? I can't quite seem yo get it working right.

Thanks.

Collapse
Posted by Malte Sussdorff on
Don't ask me about the bouncing. All changes I did to acs-mail-lite have nothing to do with the bouncing code, though I know it worked two years ago and contains the user_id and I think the package_id, so if you setup bouncing correctly in postfix, you can record bounced messages.

As for the complexity, use acs_mail_lite::send. There is a reason why the one is called complex_send 😊. And as I said, the bouncing is nothing I can help with.

Tcllib is only required in OpenACS 5.3, if the higher "package require mime" sneaked into 5.2 code then I can take this out (and probably will remove complex_send as well, as this definitely depends on tcllib).

As for your question how to get TCLlib to work with AOLserver:

http://cognovis.de/entwickler/tips/aolserver/install/ contains a full install of AOLserver including TCLlib. The part that should interest you:

wget http://heanet.dl.sourceforge.net/sourceforge/tcllib/tcllib-1.7.tar.bz2
tar xvfj tcllib-1.7.tar.bz2
cd tcllib-1.7
./configure --prefix=/usr/local/aolserver
make install

Collapse
Posted by Jon Griffin on
Malte,
Thanks,
the tcllib stuff is not in the 5.2.2 package. I was just looking at head. There seem to be many changes for the better so the bug report I filed probably doesn't apply to these versions.

Anyway thanks for the info.

Collapse
Posted by Iuri Sampaio on
Hi malte,
I did exactly what you have said. I have no errors with requires packages.
But now i got an psql error. It seems it didn't create the tables and relations. then i went the error.log to verify it:
psql:contacts-messages-create.sql:82: ERROR: relation "contact_message_log" already exists
psql:contacts-messages-create.sql:97: ERROR: duplicate key violates unique constraint "acs_object_types_pk"
CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement

<font color="red">NOTE:</font> If the error comes from a sql script you may try to source it manually. When you are done with that you should revisit the APM and try again but remember to leave the manually souced sql scipts unchecked on the previous page.

i ran mannually the scripts to create the tables. "psql -f table_name db_name"

but i still get the error.

Collapse
Posted by Malte Sussdorff on
This error message suspiciously looks like you tried to drop the package and then create it again. Due to the fact that the message_log table was missing from the drop script you got the error message.

The error message states that the table existed when the script was executed. So depending on the steps you have taken before, the table already existed in your database and therefore the script broke.

Can you do a clean install on a completely new server with nothing installed to get it working for you? Reason I ask is that so far I never had any problems and it would be good to get you running on a testing server first and then you can slowly figure out why the system breaks on your particular site.

Collapse
Posted by Iuri Sampaio on
Hi Malte,
I did a clean oacs on my test server. http://www.myybiz.net:8090

I tried to install contacts pkg. It's missing the acs-tcl-5.2.0b3 package version, that is required to install contatcs.

my source is oacs HEAD, i just downloaded it from cvs. I ran
cvs -d :pserver:mailto:anonymous@cvs.openacs.org:/cvsroot co openacs-4
and it worked fine.

so, it was suposed to have the most updated pkg, wasn't it? anyway i tried to download from cvs but i didn't find the package, I ran

cvs -d :pserver:mailto:anonymous@cvs.openacs.org:/cvsroot co -r oacs-5-2 acs-tcl-5.2

is there correct?? how do i know where the pkg is in cvs. I've read the docs but i still get lost in cvs searching the pkgs

Collapse
19: Howto checkout contacts (response to 18)
Posted by Malte Sussdorff on
Contacts requires OpenACS 5.2 (this is why there is the dependency on acs-tcl-5.2.0b3).
  1. cvs -d anonymous@cvs.openacs.org:/cvsroot co -r oacs-5-2 openacs-4
  2. mv openacs-4 myserver
  3. cvs -d anonymous@cvs.openacs.org:/cvsroot co openacs-4
  4. mv openacs-4 HEAD
  5. cd myserver/packages
  6. rm -rf acs-mail-lite *contact* *ams* *mail-tracking*
  7. mv ../../HEAD/packages acs-mail-lite *contact* *ams* *mail-tracking* .
Collapse
Posted by Iuri Sampaio on
well,
i already did that. That's why i asked if the most updated versions were at head distro.
I also checked in the pkg info. it says acs-tcl-5.2.0, but i didn't see anything about "b3" in the end though.
Collapse
Posted by Victor Guerra on
Contacts requires OpenACS 5.2 (this is why there is the >dependency on acs-tcl-5.2.0b3).

1. cvs -d mailto:anonymous@cvs.openacs.org:/cvsroot co openacs-4

Step 1 should be "cvs -d mailto:anonymous@cvs.openacs.org:/cvsroot co -r oacs-5-2 openacs-4", right ?

Collapse
Posted by Iuri Sampaio on
by the way, the command above setp 1:
cvs -d mailto:anonymous@cvs.openacs.org:/cvsroot co -r oacs-5-2 openacs-4

asks me a password, which i believe it wasn't suposed so, waqsn't it? if so what is it??
ps: just hit enter doesn't work :)

Collapse
Posted by Iuri Sampaio on
ok i've just got from cvs:
cvs -d mailto:anonymous@cvs.openacs.org:/cvsroot co -r oacs-5-2 openacs-4
followed by the steps:
1. mv openacs-4 myserver
2. cvs -d mailto:anonymous@cvs.openacs.org:/cvsroot co openacs-4
3. mv openacs-4 HEAD
4. cd myserver/packages
5. rm -rf acs-mail-lite *contact* *ams* *mail-tracking*
6. mv ../../HEAD/packages acs-mail-lite *contact* *ams* *mail-tracking* .

then i tried to install contacts pkg and I got the error bellow:

*********************************************
Server Error
There was a server error processing your request. We apologize.

Take me back where I was (before the error)
Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR: duplicate key violates unique constraint "acs_object_types_table_name_un"
CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement
PL/pgSQL function "acs_rel_type__create_type" line 22 at perform

SQL:
select acs_rel_type__create_type (
'contact_rels_spouse',
'<span>#</span>contacts.lt_Contact_Rel_Spouse#',
'<span>#</span>contacts.lt_Contact_Rels_Spous#',
'contact_rel',
'contact_rel_employment',
'rel_id',
'contact_rels_spouse',
'person',
'spouse',
'0',
NULL,
'person',
'spouse',
'0',
NULL
);

while executing
"ns_pg_bind 0or1row nsdb0 {
select acs_rel_type__create_type (
:rel_type,
:pretty_name,
:pretty_plural,
:supertype,
:table_name,
'rel_id',
:pac..."
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
("postgresql" arm line 2)
invoked from within
"switch $driverkey {
oracle {
return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
}
..."
invoked from within
"db_exec 0or1row $db $full_statement_name $sql"
invoked from within
"if {[regexp -nocase -- {^\s*select} $test_sql match]} {
# ns_log Debug "PLPGSQL: bypassed anon function"
set selection..."
("uplevel" body line 6)
invoked from within
"uplevel 1 $code_block "
invoked from within
"db_with_handle -dbn $dbn db {
# plsql calls that are simple selects bypass the plpgsql
# mechanism for creating anonymous fun..."
(procedure "db_exec_plsql" line 57)
invoked from within
"db_exec_plsql create_type FOO"
("eval" body line 1)
invoked from within
"eval [lindex $pair 0] [lindex $pair 1] [lindex $pair 2]"
(procedure "rel_types::new" line 63)
invoked from within
"rel_types::new -table_name "contact_rel_employment" -create_table_p "t" -supertype "contact_rel" -role_one "spouse" -role_two "spouse" "contact_rels_..."
(procedure "contacts::install::package_install" line 17)
invoked from within
"contacts::install::package_install "
("eval" body line 1)
invoked from within
"eval $command"
(procedure "apm_invoke_callback_proc" line 37)
invoked from within
"apm_invoke_callback_proc -version_id $version_id -type after-install"
(procedure "apm_package_install" line 146)
invoked from within
"apm_package_install -enable -package_path $package_path -load_data_model -data_model_files $data_model_files $spec_file"
("foreach" body line 52)
invoked from within
"foreach package_key $install {
ns_log Notice "Installing $package_key"

array unset version
array set version $repository($package_key..."
("uplevel" body line 49)
invoked from within
"uplevel {
ad_page_contract {
Install packages -- actual installation

@param install Tcl list of packages to install in the order in wh..."
(procedure "code::tcl::/home/yabtdev/yabtdev/packages/acs-admin/www/inst..." 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..."

Collapse
Posted by Victor Guerra on
cvs -d :pserver:mailto:anonymous@cvs.openacs.org:/cvsroot co -r oacs-5-2 openacs-4

Cheers,
Victor Guerra.

Collapse
Posted by Iuri Sampaio on
by the way what's the diference between server and pserver?

ok done, still get the error

HTTP/1.0 500 Internal Server Error Expires: Fri, 02 Jun 2006 10:49:31 GMT Pragma: no-cache Cache-Control: no-cache Server: AOLserver/4.0 MIME-Version: 1.0 Date: Fri, 02 Jun 2006 10:49:50 GMT Content-Type: text/html; charset=utf-8 Content-Length: 7595 Connection: close
yabtdev Control Panel Your Account Logout 1 Member Online Welcome, iuri sampaio
Main Site » Site-Wide Administration Server Error
There was a server error processing your request. We apologize.

Take me back where I was (before the error)
Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR: duplicate key violates unique constraint "acs_object_types_table_name_un"
CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement
PL/pgSQL function "acs_rel_type__create_type" line 22 at perform

SQL:
select acs_rel_type__create_type (
'contact_rels_spouse',
'<span>#</span>contacts.lt_Contact_Rel_Spouse#',
'<span>#</span>contacts.lt_Contact_Rels_Spous#',
'contact_rel',
'contact_rel_employment',
'rel_id',
'contact_rels_spouse',
'person',
'spouse',
'0',
NULL,
'person',
'spouse',
'0',
NULL
);

while executing
"ns_pg_bind 0or1row nsdb0 {
select acs_rel_type__create_type (
:rel_type,
:pretty_name,
:pretty_plural,
:supertype,
:table_name,
'rel_id',
:pac..."
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
("postgresql" arm line 2)
invoked from within
"switch $driverkey {
oracle {
return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
}
..."
invoked from within
"db_exec 0or1row $db $full_statement_name $sql"
invoked from within
"if {[regexp -nocase -- {^\s*select} $test_sql match]} {
# ns_log Debug "PLPGSQL: bypassed anon function"
set selection..."
("uplevel" body line 6)
invoked from within
"uplevel 1 $code_block "
invoked from within
"db_with_handle -dbn $dbn db {
# plsql calls that are simple selects bypass the plpgsql
# mechanism for creating anonymous fun..."
(procedure "db_exec_plsql" line 57)
invoked from within
"db_exec_plsql create_type FOO"
("eval" body line 1)
invoked from within
"eval [lindex $pair 0] [lindex $pair 1] [lindex $pair 2]"
(procedure "rel_types::new" line 63)
invoked from within
"rel_types::new -table_name "contact_rel_employment" -create_table_p "t" -supertype "contact_rel" -role_one "spouse" -role_two "spouse" "contact_rels_..."
(procedure "contacts::install::package_install" line 17)
invoked from within
"contacts::install::package_install "
("eval" body line 1)
invoked from within
"eval $command"
(procedure "apm_invoke_callback_proc" line 37)
invoked from within
"apm_invoke_callback_proc -version_id $version_id -type after-install"
(procedure "apm_package_install" line 146)
invoked from within
"apm_package_install -enable -package_path $package_path -load_data_model -data_model_files $data_model_files $spec_file"
("foreach" body line 52)
invoked from within
"foreach package_key $install {
ns_log Notice "Installing $package_key"

array unset version
array set version $repository($package_key..."
("uplevel" body line 49)
invoked from within
"uplevel {
ad_page_contract {
Install packages -- actual installation

@param install Tcl list of packages to install in the order in wh..."
(procedure "code::tcl::/home/yabtdev/yabtdev/packages/acs-admin/www/inst..." 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..."

Collapse
Posted by Malte Sussdorff on
Posting the same bug twice wont help 😊.

Updating CVS HEAD of contacts after Thu Jun 1 09:52:51 2006 UTC (29 hours, 39 minutes ago) and reinstalling would... (as you could see after reading my comment at https://openacs.org/forums/message-view?message_id=447209).

Collapse
Posted by Iuri Sampaio on
i really fell like a bummer. I has been a while i can't go through that and i'm sure it's a little thing

i put the same bug twice just to enphasize i'm still stuck on it. I followed exaclty the steps.

Collapse
Posted by Iuri Sampaio on
by the way, the command above setp 1:
cvs -d mailto:anonymous@cvs.openacs.org:/cvsroot co -r oacs-5-2 openacs-4

asks me a password, which i believe it wasn't suposed so, waqsn't it? if so what is it??
ps: just hit enter doesn't work :)

Collapse
29: Howto checkout contacts (response to 28)
Posted by Malte Sussdorff on
cvs -d :pserver:mailto:anonymous@cvs.openacs.org:/cvsroot co -r oacs-5-2 openacs-4
mv openacs-4 myserver
cvs -d :pserver:mailto:anonymous@cvs.openacs.org:/cvsroot co openacs-4
mv openacs-4 HEAD
cd myserver/packages
rm -rf acs-mail-lite *contact* *ams* *mail-tracking*
mv ../../HEAD/packages acs-mail-lite *contact* *ams* *mail-tracking* .
Collapse
Posted by Iuri Sampaio on
ok, nice and easy! It's installed and running.
now i'm wondering what i did wrong last time.

i'm sure i just follow the steps. :(

Collapse
Posted by Iuri Sampaio on
ooops!!
where should i report bugs?
Collapse
Posted by Iuri Sampaio on
I was trying to add person form and i got this error

There was a server error processing your request. We apologize.

Take me back where I was (before the error)
Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR: duplicate key violates unique constraint "ams_lists_package_key_key"
CONTEXT: PL/pgSQL function "ams_list__new" line 25 at SQL statement

SQL:

select ams_list__new(NULL,'contacts','person','1077__1125','1077__1125',NULL,NULL,NULL,'506','201.36.243.36',NULL)


while executing
"ns_pg_bind 0or1row nsdb0 {

select ams_list__new(:list_id,:package_key,:object_type,:list_name,:pretty_name,:description,:description_mime_type,NULL,..."
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
("postgresql" arm line 2)
invoked from within
"switch $driverkey {
oracle {
return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
}
..."
invoked from within
"db_exec 0or1row $db $full_statement_name $sql"
invoked from within
"if {[regexp -nocase -- {^\s*select} $test_sql match]} {
# ns_log Debug "PLPGSQL: bypassed anon function"
set selection..."
("uplevel" body line 6)
invoked from within
"uplevel 1 $code_block "
invoked from within
"db_with_handle -dbn $dbn db {
# plsql calls that are simple selects bypass the plpgsql
# mechanism for creating anonymous fun..."
(procedure "db_exec_plsql" line 57)
invoked from within
"db_exec_plsql create_object {}"
(procedure "package_instantiate_object" line 113)
invoked from within
"package_instantiate_object -extra_vars $extra_vars ams_list"
(procedure "ams::list::new" line 26)
invoked from within
"ams::list::new -package_key $package_key -object_type $object_type -list_name $list_name -pretty_name $pretty_name -description $description -des..."
invoked from within
"if { [string is false [exists_and_not_null blank_required_attributes]] } {
util_user_message -replace
ams::list::flush -package_key $package_key -ob..."
("uplevel" body line 15)
invoked from within
"uplevel #5 {
set uneditable_attributes [list package_key object_type list_name pretty_name description]
set blank_required_attributes [list]
..."
("uplevel" body line 1)
invoked from within
"uplevel 1 $args"
(procedure "ad_page_contract_eval" line 2)
invoked from within
"ad_page_contract_eval uplevel #$level $new_request"
(procedure "ad_form" line 468)
invoked from within
"ad_form -name list_form -form {
{list_id:key}
{package_key:text(select) {label "[_ ams.Package_Key_1]"} {options $package_options}}
{objec..."
("uplevel" body line 28)
invoked from within
"uplevel {
ad_page_contract {

@author Matthew Geddert mailto:openacs@geddert.com
@creation-date 2004-07-28
@cvs-id $Id: list-add.tcl,v 1.4..."
(procedure "code::tcl::/home/yabtdev/yabtdev/packages/ams/www/list-add" 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..."Install locales

Collapse
Posted by Iuri Sampaio on
ok we can dissmiss my last three emails. It's working fine now!