Forum OpenACS Development: Re: contacts pkg installation

Collapse
Posted by Iuri Sampaio on
So far...i cleaned up the mess and started over again.
with the orginal source I imported the db.
(e.g: "psql -f db-backup.dmp") . then I check through psql if the tables related onthe error.log were already on the database and... they are.

public | contact_deleted_history | table | yabtdev
public | contact_extend_options | table | yabtdev
public | contact_extend_search_seq | sequence | yabtdev
public | contact_groups | table | yabtdev
public | contact_groups_allowed_rels | table | yabtdev
public | contact_message_items | table | yabtdev
public | contact_message_log | table | yabtdev
public | contact_message_types | table | yabtdev
public | contact_messages | view | yabtdev
public | contact_party_revisions | table | yabtdev
public | contact_party_revisionsi | view | yabtdev
public | contact_party_revisionsx | view | yabtdev
public | contact_rel_types | view | yabtdev
public | contact_rels | table | yabtdev
public | contact_search_conditions | table | yabtdev
public | contact_search_extend_map | table | yabtdev
public | contact_search_log | table | yabtdev
public | contact_searches | table | yabtdev
public | contact_signatures | table | yabtdev

Although how is it possible if i dont see the aplication installed on the system?
Is there another package using contact's tables?

Collapse
Posted by Malte Sussdorff on
Maybe you installed the application, then deleted it and the -drop.sql scripts did not work? No other table should be using the contacts tables.
Collapse
Posted by Iuri Sampaio on
Hi Malte,
I droped all tables related on the error, except for these two: "acs_object_type__create_type" and "organization_rels"
I don't know if they are related with another stuff on the system. Do you about it

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

psql:contacts-create.sql:129: ERROR: relation "organization_rels" already exists

I don't know if they are related with another stuff on the system. Do you know about it?

another thing...
even if the error comes up... is the package installed??

Collapse
Posted by Malte Sussdorff on
Not sure about organization rels to be honest. But the package is not installed.

What you can do is load the datamodel manually in psql and then install the package using the APM and *NOT* run the datamodel create scripts.

Collapse
Posted by Iuri Sampaio on
ok i understand.

but it doesn't show the option to clear the checkbox and install the datamodel mannually.

from the screen to list the required pkg
http://www.myybiz.net/file-storage/view/error2.jpg

it goes directly to the instalation screen and get the error
http://www.myybiz.net/file-storage/view/error1.jpg

Collapse
Posted by Malte Sussdorff on
You need to install it by going to http://myybiz.net/acs-admin/apm/packages-install .

Did you do that?

Collapse
Posted by Iuri Sampaio on
well the page you just put, it takes me to another screen.
The one i had is. acs-admin->install software->from local

http://www.myybiz.net:8090/acs-admin/install/install?package%5ftype=apm%5fapplication

now, it requires for acs-events>=0.5, http://www.myybiz.net/file-storage/view/error3.jpg

i already put the version from head there but it still get the error.
version name="0.5d3" url="https://openacs.org/repository/download/apm/acs-events-0.5d3.apm";

Collapse
Posted by Iuri Sampaio on
Hi Malte,
I figured there are two ways to install a new package.

1 - The one you post above
From acs-admin -> package manager -> install new package
http://www.myybiz.net:8090/acs-admin/apm/packages-install

2- The one i oftenly used on my box
From acs-admin -> install software -> install from local/install from repository

So far i installed using the 1 method and chose to install the datamodel manually. then it was just run:
psql -f contact-create.sql

and get back to the website and enable the new package i installed.

It's working fine I believe there's no risk to be loosing data, is it correct?

ps:
before I ran contact-create.sql mannually I tried the follow steps.

I ran psql -f contact-drop.sql. Just to be sure I cleaned up everything. Then i tried to install the datamodel from the browser but i got an error reference at

psql:contacts-search-create.sql:38: ERROR: duplicate key violates unique constraint "acs_object_types_pk"
CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement

Is there any way to track the message error to show up this info then we can delete mannually from the table the record referenced by the ID?
It seems madness but I was looking at the tables the data, but it's just impossible to know all the relations. :)

I've got contacts pkg installed on my website. Mannualy I ran the sql script and enabled the pkg afterwards.

I debugged every table created by the script sql/postgresql/contacts-create.sql

the good thing is i can understand much clear what contact pkg does. Now I will have look at the procs.

I tried to track the relations created between contacts pkg and others tables on oacs. It's just impossible. I've found some and deleted. But I still get the error if i try to install the pkg form the browser
Diferent form the duplicated key error message.
psql:contacts-search-create.sql:38: ERROR: duplicate key violates unique constraint "acs_object_types_pk"
CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement

I've got this peculiar error message about write permissions on the folder
psql:contacts-package-create.sql:125: ERROR: -20000: This folder does not allow subfolders to be created
CONTEXT: PL/pgSQL function "content_folder__new" line 7 at return
PL/pgSQL function "contact__folder_id" line 11 at assignment