Forum OpenACS Q&A: User registration fails.

Collapse
Posted by Richard Hamilton on

This may have something to do with the database restore problem that I posted a couple of days ago:

https://openacs.org/forums/message-view?message_id=148479

I have included the section from the server log in the hope that someone who knows the code and data model for user registration might know which elements of the restore have failed and why.

Many Thanks
Richard

_______________________________________________

[28/Nov/2003:18:09:04][2857.81926][-conn2-] Notice: Ns_PgExec: Entering transaction
[28/Nov/2003:18:09:04][2857.81926][-conn2-] Notice: dbinit: sql(localhost::oakmasters): 'begin transaction'
[28/Nov/2003:18:09:04][2857.81926][-conn2-] Notice: Querying '

	    select acs__add_user(
                         '848',
                         'user',
                         now(),
                         null,
	                 '85.99.173.25',
			 'joe.user@bloggs.com',
			 NULL,
			 'Joe',
			 'User',
			 '4278EC14B769D7850224A838F14428FD64CAA696',
	                 '9821C414D5D089338117CB116BA22486682DC819',
	                 'Cat',
	                 'Spot',
                         null,
	                 't',
	                 'approved');'
[28/Nov/2003:18:09:04][2857.81926][-conn2-] Error: Ns_PgExec: result status: 7 message: ERROR:  -20001: membership_rel  violation: Invalid object types. Object -2 (application_group) must be of type group Object 848 (user) must be of type person

[28/Nov/2003:18:09:04][2857.81926][-conn2-] Error: dbinit: error(localhost::oakmasters,ERROR:  -20001: membership_rel  violation: Invalid object types. Object -2 (application_group) must be of type group Object 848 (user) must be of type person
): '

	    select acs__add_user(
                         '848',
                         'user',
                         now(),
                         null,
	                 '81.99.189.25',
			 'joe.user@bloggs.com',
			 NULL,
			 'Joe',
			 'User',
			 '4278EC14B769D7850224A838F14428FD64CAA696',
	                 '9821C414D5D089338117CB116BA22486682DC819',
	                 'Cat',
	                 'Spot',
                         null,
	                 't',
	                 'approved');

      '
[28/Nov/2003:18:09:04][2857.81926][-conn2-] Notice: Querying 'abort transaction;'
Collapse
Posted by Richard Hamilton on
I have been mulling over this issue - one I have never encountered before and that only ocurred after my first attempt at using the Edit-This-Page package.

The error thrown by acs__add_user :

[28/Nov/2003:18:09:04][2857.81926][-conn2-] Error: Ns_PgExec: result status: 7 message: ERROR:  -20001: membership_rel  violation: Invalid object types. Object -2 (application_group) must be of type group Object 848 (user) must be of type person

Looks to me like corruption of the acs_objects table, so I wanted to check certain behaviours of ETP in case I have misused it.

I mounted ETP on a first level site node and expected to be able to add subnodes - which I did. What I did not expect was to be able to click edit-parent-page and be given a page relating to the Main Site node. However once I found that I could do this I added a number of subtopics to this and edited those as well.

This had the effect of adding new first level site notes which appeared in site-map as new package instances of ETP that had not been mounted using the package manager. They seemed to behave OK until I encountered the user registration problem.

So what I am wondering is whether in fact this should not be happening and that adding subtopics at this level has mixed up the object_type references so that the database thinks that I am trying to add someone as a user of an application group.

For info, the acs__add_user failure did write to the server log but did not report failure to the browser, so for the user it failed silently.

Any help and guidance gratefully appreciated. Meanwhile I will rebuild from a fresh install, re-arrange my ETP structure and try a DB restore.

Regards
Richard

Collapse
Posted by Richard Hamilton on
I have successfuly restored the db which leads me to suspect that the ETP package is at fault. I think that it should not offer "Edit-Parent-Page" when at the ETP instance node. If this link were removed at that level the problem would go away.

I may be wrong though and would welcome comments.

R.